What is the output of the following code?
class test {
public $value = 0;
function test() {
$this->value = 1;
}
function __construct() {
$this->value = 2;
}
}
$object = new test();
echo $object->value;
A. 2
B. 1
C. 0
D. 3
E. No Output, PHP will generate an error message.
Which of these databases is NOT supported by a PDO driver?
A. Microsoft SQL Server
B. SQLite
C. Microsoft Access
D. Berkeley DB
What is the name of the function that allows you register a set of functions that implement user-defined session handling?
A. session_set_handler()
B. session_set_storage_handler()
C. session_register_handler()
D. session_set_save_handler()
What is the name of the header used to require HTTP authentication?
A. Authorization-Required
B. WWW-Authenticate
C. HTTP-Authenticate
D. Authentication-Required
E. HTTP-Auth
What types of HTTP authentication are supported by PHP? (Choose 2)
A. Basic
B. Advanced
C. Strict
D. Digest
E. Realm
Which of the following items in the $_SERVER superglobal are important for authenticating the client when using HTTP Basic authentication? (Choose 2)
A. PHP_AUTH_TYPE
B. PHP_AUTH_PASSWORD
C. PHP_AUTH_DIGEST
D. PHP_AUTH_PW
E. PHP_AUTH_USER
When tracking upload progress with sessions, the values of 2 INI settings are needed to determine the key in $_SESSION of the upload progress data. What are the INI settings? (Choose 2)
A. session.upload_progress.file
B. session.upload_progress.key
C. session.upload_progress.prefix
D. session.upload_progress.freq
E. session.upload_progress.name
Which of the following PHP functions can be used to set the HTTP response code? (Choose 2)
A. header_add()
B. header()
C. http_set_status()
D. http_response_code()
E. http_header_set()
Which of the following does NOT help to protect against session hijacking and fixation attacks?
A. Use SSL and set the $secure cookie parameter to true .
B. Set the session.use_only_cookies php.ini parameter to 1 .
C. Set the session.cookie_lifetime php.ini parameter to 0 .
D. Protect against XSS vulnerabilities in the application.
E. Rotate the session id on successful login and logout using session_regenerate_id()
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);
A. No, the code is fully protected from SQL Injection.
B. Yes, because the $name variable is improperly escaped.
C. Yes, because the $name variable and the $age variable is improperly escaped.
D. Yes, because the $age variable is improperly escaped.
E. Yes, because you cannot prevent SQL Injection when using MySQLi
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Zend exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 200-550 exam preparations and Zend certification application, do not hesitate to visit our Vcedump.com to find your solutions here.