Home > PHP & Programming > Quizzes > 200-550 Test: Zend Certified PHP Engineer
200-550 Test: Zend Certified PHP Engineer
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 23% Most missed: “What is the result of the following bitwise operation in PHP?”
200-550 Test: Zend Certified PHP Engineer
Time left 00:00
25 Questions

1. Which of the following can NOT be used to send a cookie from within a PHP application?
2. Which of the following rules must every correct XML document adhere to? (Choose 2)
3. Which constant must be passed as the second argument to htmlentities() to convert single quotes (') to HTML entities?
4. What is the output of the following code? class A { public $a = 1; public function __construct($a) { $this->a = $a; } public function mul() { return function($x) { return $this->a*$x; }; } } $a = new A(2); $a->mul = function($x) { return $x*$x; }; $m = $a->mul(); echo $m(3);
5. Which PHP function sets a cookie and URL encodes its value when sending it to the browser? Correct Answer: setcookie, setcookie() What is the output of the following code? echo '1' . (print '2') + 3;"
6. An unbuffered database query will:
7. Consider the following XML code: PHP 5.5 in 42 Hours Learning PHP 5.5 The Hard Way Which of the following SimpleXML calls prints the name of the second book? (Let $xml = simplexml_load_file("books.xml"); .) "
8. 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);"
9. Which of the following code snippets is correct?
10. What is the output of the following code? function fibonacci (&$x1 = 0, &$x2 = 1) { $result = $x1 + $x2; $x1 = $x2; $x2 = $result; return $result; } for ($i = 0; $i < 10; $i++) { echo fibonacci() . ','; }
11. From your PHP application, how can you send the same header twice, but with different values?
12. What is the name of the PHP function used to automatically load non-yet defined classes?
13. What is the length of a string returned by: md5(rand(), TRUE);
14. 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);
15. Which of the following filtering techniques prevents all cross-site scripting (XSS) vulnerabilities?
16. Which string will be returned by the following function call? $test = '/etc/conf.d/wireless'; substr($test, strrpos($test, '/')); // note that strrpos() is being called, and not strpos()
17. Which of the following is NOT true about PHP traits? (Choose 2)
18. Which of the following can be registered as entry points with a SoapServer instance (choose 2):
19. What is the name of the function that allows you register a set of functions that implement user-defined session handling?
20. What is the output of the following code? class a { public $val; } function renderVal (a $a) { if ($a) { echo $a->val; } } renderVal (null);
21. What function can be used to retrieve an array of current options for a stream context?
22. What is instanceof" an example of?"
23. What types of HTTP authentication are supported by PHP?
24. What method can be used to find the tag via the DOM extension?
25. You want to access the 3rd character of a string, contained in the variable $test. Which of the following possibilites work?