What is the difference between "print" and "echo"
Which of the following XML declarations is NOT valid?
What visibility denies access to properties and methods outside of the class?
What object method specifies post-serialization behavior for an object?
What method can be used to find a tag with the name "foo" via the DOM extension?
What is the output of the following code?
$a = 1;
++$a;
$a*=$a;
echo $a--;
Which one of the following technologies was not built into PHP before version 5?
How can you redirect a client to another page using PHP?
What is the result of the following bitwise operation in PHP?
1 ^ 2
What is the output of the following code?
echo 0x33, ' monkeys sit on ', 011, ' trees.';
What is the output of the following script?
1
2 class a
3 {
4 public $val;
5 }
6
7 function renderVal (a $a)
8 {
9 if ($a) {
10 echo $a->val;
11 }
12 }
13
14 renderVal (null);
15 ?>
What DOMElement method should be used to check for availability of a non-namespaced attribute?
When a class is defined as final it:
What is the return value of the following code?
strpos("me myself and I", "m", 2)
What super-global should be used to access information about uploaded files via a POST request?
Would the following code catch a parse error?
try {
echo $label
} catch (Exception $e) {
echo $e->getMessage();
}
Can a private static member be accessed from a public static method of the same class?
Which of the following statements about Reflection are correct? (Choose 2)
What function allows resizing of PHP's file write buffer?
Which PHP function retrieves a list of HTTP headers that have been sent as part of the HTTP response or are ready to be sent?
When PHP is running on a command line, what super-global will contain the command line arguments specified?
Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?
Given the following two functions, what statement is correct?
function dynamicNew($name) {
return new $name;
}
function reflectionNew($name) {
$r = new ReflectionClass($name);
return $r->newInstanceArgs();
}
What function returns the filename component of the file's path:
Consider the following XML code:
<books>
<book id="1">PHP 5 Power Programming
<book id="2">Learning PHP 5
Which of the following SimpleXML calls print the name of the second book?
(Let $xml=simplexml_load_file("books.xml");) (Choose 2)
How can a PHP extension be loaded? (Choose 2)
Which of the following statements about database connections are commonly true? (Choose 2)
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 ?>
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');
Which of the following rules must every correct XML document adhere to? (Choose 2)
What is the name of the method that can be used to provide read access to virtual properties in a class?
Which technique should be used to speed up joins without changing their results?