Zend 200-550 Exam
Zend Certified PHP Engineer (Page 8 )

Updated On: 30-Jan-2026

Which of the following are NOT acceptable ways to create a secure password hash in PHP? (Choose 2)

  1. md5()
  2. hash_pbkdf2()
  3. password_hash()
  4. crypt()
  5. openssl_digest()

Answer(s): A,E



What is the preferred method for preventing SQL injection?

  1. Always using prepared statements for all SQL queries.
  2. Always using the available database-specific escaping functionality on all variables prior to building the SQL query.
  3. Using addslashes() to escape variables to be used in a query.
  4. Using htmlspecialchars() and the available database-specific escaping functionality to escape variables to be used in a query.

Answer(s): A



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);

  1. No, the code is fully protected from SQL Injection.
  2. Yes, because the $name variable is improperly escaped.
  3. Yes, because the $name variable and the $age variable is improperly escaped.
  4. Yes, because the $age variable is improperly escaped.
  5. Yes, because you cannot prevent SQL Injection when using MySQLi

Answer(s): D



Which of the following does NOT help to protect against session hijacking and fixation attacks?

  1. Use SSL and set the $secure cookie parameter to true .
  2. Set the session.use_only_cookies php.ini parameter to 1 .
  3. Set the session.cookie_lifetime php.ini parameter to 0 .
  4. Protect against XSS vulnerabilities in the application.
  5. Rotate the session id on successful login and logout using session_regenerate_id()

Answer(s): C



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);

  1. 404, 404 Not Found

Answer(s): A



Viewing page 8 of 46
Viewing questions 36 - 40 out of 223 questions



Post your Comments and Discuss Zend 200-550 exam prep with other Community members:

Join the 200-550 Discussion