3 Months Free Update
3 Months Free Update
3 Months Free Update
Which of the following may be used in conjunction with CASE inside a SWITCH statement?
Given the following array:
$a = array(28, 15, 77, 43);
Which function will remove the value 28 from $a?
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 ?>
Which of the following did not result in an output error in PHP 4 but does in PHP 5?
You want to parse a URL into its single parts. Which function do you choose?
What piece of code would you use to obtain an array of response headers for a given URL, indexed by their respective names?
You want to present the following formatted number: "999.000.000,00". Which function call is correct?
How many times will the function counter() be executed in the following code?
function counter($start, &$stop)
{
if ($stop > $start)
{
return;
} counter($start--, ++$stop);
}
$start = 5;
$stop = 2;
counter($start, $stop);
Which of the following can be registered as entry points with a SoapServer instance (choose 3)
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)
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();
?>
Given the following code, what is correct?
function f(stdClass &$x = NULL) { $x = 42;
}
$z = new stdClass;
f($z);
var_dump($z);
Which of the following data types cannot be directly manipulated by the client?
What is the content of $c after the following code has executed?
$a = 2;
$b = 3;
$c = ($a++ * ++$b);
What will the following function call return?
strstr('http://example.com/test/file.php ', '/');
You analyze the code of a colleague and see a call to the function quotemeta(). You give the string "Holy $%&[. What's going on?" as a parameter to it. What will it output?
Which elements does the array returned by the function pathinfo() contain?
You are creating an application that repeatedly connects to a database to retrieve order data for invoices. All data comes from the same database. In order to preserve resources, you have to ensure that only one database connection should be used at any time. The code also has to open as few new database connections as possible. Which design pattern should you use for this scenario?
Which of these protocols are NOT governed by the W3C in their latest versions? (Choose 2)