Zend-Technologies Zend Certified PHP Engineer - 200-550무료 덤프문제 풀어보기
Which of the following PHP functions can be used to set the HTTP response code? (Choose 2)
정답: C,D
Which of the following does NOT help to protect against session hijacking and fixation attacks?
정답: D
Given a php.ini setting of
default_charset = utf-8
what will the following code print in the browser?
header('Content-Type: text/html; charset=iso-8859-1');
echo '✂✔✝';
default_charset = utf-8
what will the following code print in the browser?
header('Content-Type: text/html; charset=iso-8859-1');
echo '✂✔✝';
정답: B
Which of the following are NOT acceptable ways to create a secure password hash in PHP? (Choose 2)
정답: C,E
Consider the following table data and PHP code. What is a possible 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);
$cmd = "SELECT name, email FROM users LIMIT 1";
$stmt = $pdo->prepare($cmd);
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_BOTH);
$row = $result[0];
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);
$cmd = "SELECT name, email FROM users LIMIT 1";
$stmt = $pdo->prepare($cmd);
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_BOTH);
$row = $result[0];
정답: B
What will be the output of the following code?
$a = array(0, 1, 2 => array(3, 4));
$a[3] = array(4, 5);
echo count($a, 1);
$a = array(0, 1, 2 => array(3, 4));
$a[3] = array(4, 5);
echo count($a, 1);
정답: D
CORRECT TEXT
What is the output of the following code?
function increment ($val)
{
++$val;
}
$val = 1;
increment ($val);
echo $val;
What is the output of the following code?
function increment ($val)
{
++$val;
}
$val = 1;
increment ($val);
echo $val;
정답:
1
Transactions should be used to: (Choose 2)
정답: A,C
In the following code, which classes can be instantiated?
abstract class Graphics {
abstract function draw($im, $col); }
abstract class Point1 extends Graphics { public $x, $y; function __construct($x, $y) { $this->x = $x; $this->y = $y; } function draw($im, $col) { ImageSetPixel($im, $this->x, $this->y, $col); }
}
class Point2 extends Point1 { }
abstract class Point3 extends Point2 { }
abstract class Graphics {
abstract function draw($im, $col); }
abstract class Point1 extends Graphics { public $x, $y; function __construct($x, $y) { $this->x = $x; $this->y = $y; } function draw($im, $col) { ImageSetPixel($im, $this->x, $this->y, $col); }
}
class Point2 extends Point1 { }
abstract class Point3 extends Point2 { }
정답: C
PHP's array functions such as array_values() can be used on an object if the object...
정답: C
CORRECT TEXT
Which value will be assigned to the key 0 in this example?
$foo = array(true, '0' => false, false => true);
Which value will be assigned to the key 0 in this example?
$foo = array(true, '0' => false, false => true);
정답:
true
What is the output of the following code?
function ratio ($x1 = 10, $x2) {
if (isset ($x2)) {
return $x2 / $x1;
}
}
echo ratio (0);
function ratio ($x1 = 10, $x2) {
if (isset ($x2)) {
return $x2 / $x1;
}
}
echo ratio (0);
정답: B
Which of the following items in the $_SERVER superglobal are important for authenticating the client when using HTTP Basic authentication? (Choose 2)
정답: B,C