Zend PHP 5 Certification
Last Update May 15, 2024
Total Questions : 219
We are offering FREE 200-500 Zend exam questions. All you do is to just go and sign up. Give your details, prepare 200-500 free exam questions and then go for complete pool of Zend PHP 5 Certification test questions that will help you more.
Which technique should be used to speed up joins without changing their results?
Which of the following function signatures is correct if you want to have classes automatically loaded?
Given the following two functions, what statement is correct?
function dynamicNew($name) {
return new $name;
}
function reflectionNew($name) {
$r = new ReflectionClass($name);
return $r->newInstanceArgs();
}
After running this sort, what will be the value of $b?
$a = array('_!', 'def', 0);
$b = sort($a);
After executing a query on a database server, PHP offers several functions to read the resulting lines, such as mysqli_fetch_assoc, pg_fetch_row, oci_fetch,etc.). If such functions do not return any rows, it means: (Choose 2)
An HTML form contains this form element:
The user clicks on the image to submit the form. How can you now access the relative coordinates of the mouse click?
What is the output of the following script?
1
2 class a
3 {
4 public $val;
5 }
6
7 function renderVal (a $a)
8 {
9 if ($a) {
10 echo $a->val;
11 }
12 }
13
14 renderVal (null);
15 ?>
Type hinting in PHP allows the identification of the following variable types: (Choose 2)
When checking whether two English words are pronounced alike, which function should be used for the best possible result?
What is the output of the following code?
$a = 3;
switch ($a) {
case 1: echo 'one'; break;
case 2: echo 'two'; break;
default: echo 'four'; break;
case 3: echo 'three'; break;
}
What will the following code piece print?
echo strtr('Apples and bananas', 'ae', 'ea')
How can the line on which HTTP headers were sent inside a script be determined?
You are creating an application that repeatedly connects to a database to retrieve order data for invoices. All data comes from the same database. In order to preserve resources, you have to ensure that only one database connection should be used at any time. The code also has to open as few new database connections as possible. Which design pattern should you use for this scenario?
What is the output of the following code?
try {
class MyException extends Exception {};
try {
throw new MyException;
}
catch (Exception $e) {
echo "1:";
throw $e;
}c
atch (MyException $e) {
echo "2:";
throw $e;
}}
catch (Exception $e) {
echo get_class($e);
}
Which of the following rules must every correct XML document adhere to? (Choose 2)
What is the output of the following code?
str_pad('PHP', 10, 'P', STR_PAD_BOTH);
When comparing prepared statements and regular, application-constructed SQL statements, which of the following is true?
When uploading a file to a PHP script using the HTTP PUT method, where would the information about this file be available?
Which PHP function retrieves a list of HTTP headers that have been sent as part of the HTTP response or are ready to be sent?
What is the output of the following script?
1
2 function fibonacci (&$x1 = 0, &$x2 = 1)
3 {
4 $result = $x1 + $x2;
5 $x1 = $x2;
6 $x2 = $result;
7
8 return $result;
9 }
10
11 for ($i = 0; $i < 10; $i++) {
12 echo fibonacci() . ',';
13 }
14 ?>
Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?