What is the function of backtick (`) characters in PHP?
How many elements does the array $pieces contain after the following piece of code has been executed?
$pieces = explode("/", "///");
What is the difference between "print" and "echo"?
You want to extract the pieces of a date string, which looks like this:
"2005-11-02". Which of the following pieces of code will properly assign $year,
$month and $day with their respective values?
What is the output of the following code?
class test {
public $value = 0;
function test() {
$this->value = 1;
} function __construct() {
$this->value = 2;
}}
$object = new test();
echo $object->value;
One common security risk is exposing error messages directly in the browser. Which PHP configuration directive can be disabled to prevent this?
What is the output of the following code?
str_pad('PHP', 10, 'P', STR_PAD_BOTH);
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 does the __FILE__ constant contain?
Where does the session extension store the session data by default?