What is the output of the following code?
function z($x) {
return function ($y) use ($x) {
return str_repeat($y, $x);
};
}
$a = z(2);
$b = z(3);
echo $a(3) . $b(2);
A. 22333
B. 33222
C. 33322
D. 222333
What is the output of the following code?
function ratio ($x1 = 10, $x2)
{
if (isset ($x2)) {
return $x2 / $x1;
}
}
echo ratio (0);
A. 0
B. An integer overflow error
C. A warning, because $x1 is not set
D. A warning, because $x2 is not set
E. A floating-point overflow error
F. Nothing
Which of the following tasks can be achieved by using magic methods? (Choose 3)
A. Initializing or uninitializing object data
B. Creating a new stream wrapper
C. Creating an iterable object
D. Processing access to undefined methods or properties
E. Overloading operators like +, *, etc.
F. Converting objects to string representation
Which of the following statements is correct?
A. Interfaces can extend only one interface
B. Interfaces can extend more than one interface
C. Interfaces can inherit a method from different interfaces
D. Interfaces can redeclare inherited methods
What is the output of the following code? var_dump(boolval([]));
A. bool(true)
B. bool(false)
What is the output of the following code? var_dump(boolval(new StdClass()));
A. bool(true)
B. bool(false)
You want to parse a URL into its single parts. Which function do you choose?
A. parse_url()
B. url_parse()
C. get_url_parts()
D. geturlparts()
What is the output of the following code? echo '1' . (print '2') + 3;
A. 123
B. 213
C. 142
D. 214
E. Syntax error
Consider the following two files. When you run test.php, what would the output look like?
test.php:
include "MyString.php";
print ",";
print strlen("Hello world!");
MyString.php:
namespace MyFramework\String;
function strlen($str)
{
return \strlen($str)*2; // return double the string length
}
print strlen("Hello world!")
A. 12,12
B. 12,24
C. 24,12
D. 24,24
E. PHP Fatal error: Cannot redeclare strlen()
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);
A. 9
B. 6
C. 0
D. 3
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Zend exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 200-710 exam preparations and Zend certification application, do not hesitate to visit our Vcedump.com to find your solutions here.