Zend 200-500 - Zend PHP 5 Certification
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 ?>
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;
Which of the following data types is implicitly passed by reference in PHP 5 while it is passed by value in PHP 4?
What DOMElement method should be used to check for availability of a non-namespaced attribute?
You analyze the code of a collegue and see, it uses the function strcasecmp. You try it out to see what it does and use the following function call:
strcasecmp('hello my dear!', 'Hello my DEAR!');
The function call returns "0". What does that mean?
What is the maximum size of the VARCHAR column type?
One common security risk is exposing error messages directly in the browser. Which PHP configuration directive can be disabled to prevent this?
Which of the following can be registered as entry points with a SoapServer instance (choose 3)
Given the following code, what is correct?
function f(stdClass &$x = NULL) { $x = 42;
}
$z = new stdClass;
f($z);
var_dump($z);
How many times will the function counter() be executed in the following code?
function counter($start, &$stop)
{
if ($stop > $start)
{
return;
} counter($start--, ++$stop);
}
$start = 5;
$stop = 2;
counter($start, $stop);