Zend Certified PHP Engineer
Last Update May 16, 2024
Total Questions : 223
We are offering FREE 200-550 Zend exam questions. All you do is to just go and sign up. Give your details, prepare 200-550 free exam questions and then go for complete pool of Zend Certified PHP Engineer test questions that will help you more.
One common security risk is exposing error messages directly in the browser. Which PHP configuration directive can be disabled to prevent this?
You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)
What is the output of the following code?
function increment (&$val)
{
return $val + 1;
}
$a = 1;
echo increment ($a);
echo increment ($a);
You'd like to use the class MyDBConnection that's defined in the MyGreatFramework\MyGreatDatabaseAbstractionLayer namespace, but you want to minimize *as much as possible* the length of the class name you have to type. What would you do?
Your public web application needs to provide access to binary files for registered users only. How would you achieve this?
Which of the following techniques ensures that a value submitted in a form can only be yes or no ?
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);
How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object
found inside $xml?
Given a JSON-encoded string, which code sample correctly indicates how to decode the string to native PHP values?
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);
Consider the following code. What change must be made to the class for the code to work as written?
class Magic {
protected $v = array("a" => 1, "b" => 2, "c" => 3);
public function __get($v) {
return $this->v[$v];
}
}
$m = new Magic();
$m->d[] = 4;
echo $m->d[0];
What is the return value of the following code?
strpos("me myself and I", "m", 2)
What is the name of the PHP function used to automatically load non-yet defined classes?
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()
What is the output of the following code?
class Number {
private $v = 0;
public function __construct($v) { $this->v = $v; }
public function mul() {
return function ($x) { return $this->v * $x; };
}
}
$one = new Number(1);
$two = new Number(2);
$double = $two->mul()->bindTo($one);
echo $double(5);
Which of the following superglobals does not necessarily contain data from the client?
Which of the following are NOT acceptable ways to create a secure password hash in PHP? (Choose 2)
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);
Which DOMElement property provides a reference to the list of the element's children?
Please provide the name of the super-global variable where all the information about cookies is available.
Which of the following can be registered as entry points with a SoapServer instance (choose 2):
Given the following code, what is correct?
function f(stdClass &$x = NULL) { $x = 42; }
$z = new stdClass;
f($z);
var_dump($z);
Which of the following methods are available to limit the amount of resources available to PHP through php.ini? (Choose 2)