200-550 無料問題集「Zend-Technologies Zend Certified PHP Engineer」

What super-global should be used to access information about uploaded files via a POST request?

What is the output of this code?
$world = 'world'; echo <<<'TEXT' hello $world
TEXT;

What function can be used to retrieve an array of current options for a stream context?

Is the following code vulnerable to SQL Injection ($mysqli is an instance of the MySQLi class)?
$age = $mysqli->real_escape_string($_GET['age']);
$name = $mysqli->real_escape_string($_GET['name']);
$query = "SELECT * FROM `table` WHERE name LIKE '$name' AND age = $age";
$results = $mysqli->query($query);

CORRECT TEXT
Which DOMElement property provides a reference to the list of the element's children?
正解:
childNodes
CORRECT TEXT
Please provide the value of the $code variable in the following statement to set an HTTP status code that signifies that the requested resource was not found.
http_response_code($code);
正解:
404, 404 Not Found
CORRECT TEXT
What is the output of the following code?
function increment ($val) {
$_GET['m'] = (int) $_GET['m'] + 1; }
$_GET['m'] = 1;
echo $_GET['m'];
正解:
1
Consider the following table data and PHP code. What is the outcome?
Table data (table name "users" with primary key "id"):
id name email
1 anna [email protected] 2 betty [email protected] 3 clara [email protected] 5 sue [email protected]
PHP code (assume the PDO connection is correctly established):
$dsn = 'mysql:host=localhost;dbname=exam';
$user = 'username';
$pass = '********';
$pdo = new PDO($dsn, $user, $pass);
try {
$cmd = "INSERT INTO users (id, name, email) VALUES (:id, :name, :email)";
$stmt = $pdo->prepare($cmd);
$stmt->bindValue('id', 1);
$stmt->bindValue('name', 'anna');
$stmt->bindValue('email', '[email protected]');
$stmt->execute();
echo "Success!";
} catch (PDOException $e) {
echo "Failure!";
throw $e;
}

What is the return value of the following code?
strpos("me myself and I", "m", 2)

What is the output of the following code?
class C { public $x = 1; function __construct() { ++$this->x; } function __invoke() { return ++$this->x; } function __toString() { return (string) --$this->x; }
}
$obj = new C(); echo $obj();

What is the output of the following code?
class a { public $val; }
function renderVal (a $a)
{ if ($a) { echo $a->val; }
}
renderVal (null);

How many elements does the array $matches from the following code contain?
$str = "The cat sat on the roof of their house.";
$matches = preg_split("/(the)/i", $str, -1, PREG_SPLIT_DELIM_CAPTURE);

Transactions are used to...

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡