Zend 200-550 - Zend Certified PHP Engineer
When would you use classes and when would you use namespaces?
Which of the following items in the $_SERVER superglobal are important for authenticating the client when using HTTP Basic authentication? (Choose 2)
Transactions should be used to: (Choose 2)
What is the output of the following code?
function increment ($val)
{
$val = $val + 1;
}
$val = 1;
increment ($val);
echo $val;
Which of the following statements about PHP is false? (Choose 2)
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()
Which of the following can NOT be used to send a cookie from within a PHP application?
In the following code, which line should be changed so it outputs the number 2:
class A {
protected $x = array(); /* A */
public function getX() { /* B */
return $this->x; /* C */
}
}
$a = new A(); /* D */
array_push($a->getX(), "one");
array_push($a->getX(), "two");
echo count($a->getX());
What will the following code print out?
$str = '✔ one of the following';
echo str_replace('✔', 'Check', $str);
Which of the following techniques ensures that a value submitted in a form can only be yes or no ?