How do you allow the caller to submit a variable number of arguments to a function?
Answer(s): B
What will the $array array contain at the end of this script?function modifyArray (&$array){foreach ($array as &$value){$value = $value + 1;}$value = $value + 2;}$array = array (1, 2, 3);modifyArray($array);
What is the output of the following code?class a{public $val;}function renderVal (a $a){if ($a) {echo $a->val;}}renderVal (null);
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() . ', ';}
What is the output of the following code?function ratio ($x1 = 10, $x2){if (isset ($x2)) {return $x2 / $x1;}}echo ratio (0);
Answer(s): D
Post your Comments and Discuss Zend 200-550 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the 200-550 content, but please register or login to continue.