200-550 Zend Certified PHP Engineer Free Practice Exam Questions (2025 Updated)
Prepare effectively for your Zend 200-550 Zend Certified PHP Engineer certification with our extensive collection of free, high-quality practice questions. Each question is designed to mirror the actual exam format and objectives, complete with comprehensive answers and detailed explanations. Our materials are regularly updated for 2025, ensuring you have the most current resources to build confidence and succeed on your first attempt.
What DOM method is used to load HTML files?
What SimpleXML function is used to parse a file?
What is the output of the following code?
class a
{
public $val;
}
function renderVal (a $a)
{
if ($a) {
echo $a->val;
}
}
renderVal (null);
What will the following code piece print?
echo strtr('Apples and bananas', 'ae', 'ea')
Which of the following statements about PHP is false? (Choose 2)
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 alpha@example.com
2 betty beta@example.org
3 clara gamma@example.net
5 sue sigma@example.info
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];
Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?
What is the output of the following code?
class Foo Implements ArrayAccess {
function offsetExists($k) { return true;}
function offsetGet($k) {return 'a';}
function offsetSet($k, $v) {}
function offsetUnset($k) {}
}
$x = new Foo();
echo array_key_exists('foo', $x)?'true':'false';
How many elements does the $matches array contain after the following function call is performed?
preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=201[0-9])/', '21st March 2014', $matches);
Which interfaces could class C implement in order to allow each statement in the following code to work? (Choose 2)
$obj = new C();
foreach ($obj as $x => $y) {
echo $x, $y;
}
Which of the following statements is NOT correct?
Which of the following statements is NOT true?
Which of the following rules must every correct XML document adhere to? (Choose 2)
Which of the following is NOT true about PHP traits? (Choose 2)
You work for a shared hosting provider, and your supervisor asks you to disable user scripts to dynamically load PHP extensions using the dl() function. How can you do this? (Choose 2)
When a query that is supposed to affect rows is executed as part of a transaction, and reports no affected rows, it could mean that: (Choose 2)
Which of the following filtering techniques prevents all cross-site scripting (XSS) vulnerabilities?
What is cached by an opcode cache?
Which methods can be used to overload object properties? (Choose 2)
Which of the following code snippets DO NOT write the exact content of the file "source.txt" to "target.txt"? (Choose 2)