What is the content of $c after the following code has executed?
$a = 2;
$b = 3;
$c = ($a++ * ++$b);
What is the best way to run PHP 4 and PHP 5 side-by-side on the same Apache server?
What will the $array array contain at the end of this script?
1
2 function modifyArray (&$array)
3 {
4 foreach ($array as &$value)
5 {
6 $value = $value + 1;
7 }
8
9 $value = $value + 2;
10 }
11
12 $array = array (1, 2, 3);
13 modifyArray($array);
14 ?>
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 will be the value of $b after running the following code?
$a = array('c', 'b', 'a');
$b = (array)$a;
Which of these protocols are NOT governed by the W3C in their latest versions? (Choose 2)
What is the output of the following script?
1
2 function fibonacci ($x1, $x2)
3 {
4 return $x1 + $x2;
5 }
6
7 $x1 = 0;
8 $x2 = 1;
9
10 for ($i = 0; $i < 10; $i++) {
11 echo fibonacci($x1, $x2) . ',';
12 }
13 ?>
Given the default PHP configuration, how can all of the parameters provided via GET be accessed in a form of a string?
Consider the following two files. When you run test.php, what would the output look like?
You have a variable $test that contains sub-strings divided by a dash ("-"). How can you put every sub-string into an array element easily?
When PHP is running on a command line, what super-global will contain the command line arguments specified?
What is the output of the following code?
$a = 'a'; $b = 'b';
echo isset($c) ? $a.$b.$c : ($c = 'c').'d';
Some databases support the LIMIT clause. It is a method to ensure that ...
What function is used to retrieve all available information about a symbolic link?
What DOMElement method should be used to check for availability of a non-namespaced attribute?
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 of the following data types is implicitly passed by reference in PHP 5 while it is passed by value in PHP 4?
Which of the following is used to find all PHP files under a certain directory?
You want to run the following PHP 4 code with PHP 5. In the following example, which access modifier in PHP 5 is equivalent to "var"?
class Test {
var $tester;
}
Given the following array:
$a = array(28, 15, 77, 43);
Which function will remove the value 28 from $a?
You work for a shared hosting provider, and your supervisor asks you to disable user scripts to dynamically load PHP extensions using the dl() function. How can you do this? (Choose 2)