What will be the output of the following code?
$a = array(0, 1, 2 => array(3, 4));
$a[3] = array(4, 5);
echo count($a, 1);
What happens if you try to access a property whose name is defined in a parent class as private, and is not declared in the current class?
What is the file locking mode that should be used when writing to a file?
Which of the following rules must every correct XML document adhere to? (Choose 2)
Which of the following may be used in conjunction with CASE inside a SWITCH statement?
Under which circumstances is the $_SESSION super-global available? (Choose 2)
You need to escape special characters to use user input inside a regular expression. Which functions would you use? (Choose 2)
What is the result of the following code:
class T
{ const A
=
42 + 1;
}
echo T::A;
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');
Consider the following XML code:
Which of the following SimpleXML calls print the name of the second book?
(Let $xml=simplexml_load_file("books.xml");) (Choose 2)