Zend 200-530 - Zend PHP 5.3 Certification
What is the output of the following code?
1
2 for ($i = 0; $i < 1.02; $i += 0.17) {
3 $a[$i] = $i;
4 }
5 echo count($a);
6 ?>
What function is ideal for outputting contents of a static file to screen?
The following code piece should print "PHP is cool", but unexpectedly, it just prints "cool". How would you correct it?
echo str_replace('PHP is a pain.', 'a pain', 'cool');
What is "instanceof" an example of:
Identify the security vulnerability in the following example:
1
2 mail('feedback@example.org',
3 'Feddback',
4 'Here is my feedback.',
5 "From: {$_COOKIE['email']}");
6 ?>
After running this sort, what will be the value of $b?
$a = array('_!', 'def', 0);
$b = sort($a);
How can a SimpleXML object be converted to a DOM object?
What DOMElement method should be used to check for availability of a non-namespaced attribute?
What is the error in the following declaration of a static class method?
1
2 class car {
3 static $speeds = array(
4 'fast',
5 'slow',
6 'medium',
7 );
8
9 static function getSpeeds()
10 {
11 return $this->speeds;
12 }
13 }
14 ?>
After performing the following operations:
$a = array('a', 'b', 'c');
$a = array_keys(array_flip($a));
What will be the value of $a?