You want to parse a URL into its single parts. Which function do you choose?
Which of the listed changes would you make to the following PHP 4 code in order to make it most compliant with PHP 5? (Choose 2)
<?php
class Car {
var $model;
function Car($model) {
$this->model = $model;
} function toString() {
return "I drive a $this->model.";
}}
$c = new Car('Dodge');
echo $c->toString();
?>
You'd like to use the class MyDBConnection that's defined in the MyGreatFrarnework\GreafDatabaseAbstractionLayer namespace, but you want to minimize *as much as possible* the length of the class name you have to type. What would you do?
What is the output of the following code?
echo 0x33, ' monkeys sit on ', 011, ' trees.';
You analyze the code of a collegue and see, it uses the function strcasecmp. You try it out to see what it does and use the following function call:
strcasecmp('hello my dear!', 'Hello my DEAR!');
The function call returns "0". What does that mean?
How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object found inside $xml?
What will the following code print?
echo addslashes('I am a small "HTML" string, which is
\'invalid\'.');
Which of the following XML declarations is NOT valid?
What is the output of the following code: echo "1" + 2 * "0x02";
The purpose of the singleton pattern is to...