Consider the following code:
strspn($test, 'aeiou', 1);
The variable $test contains the string "You get certified".
What will the function call return?
The following form is loaded in a recent browser and submitted, with the second list element selected:
In the server-side PHP code to deal with the form data, what is the value of $_POST['list']?
PHP's array functions such as array_values() and array_key_exists() can be used on an object if the object...
Which technique should be used to speed up joins without changing their results?
What is the output of the following code?
try {
class MyException extends Exception {};
try {
throw new MyException;
}
catch (Exception $e) {
echo "1:";
throw $e;
}c
atch (MyException $e) {
echo "2:";
throw $e;
}}
catch (Exception $e) {
echo get_class($e);
}
You want to present the following formatted number: "999.000.000,00". Which function call is correct?
What function is ideal for outputting contents of a static file to screen?
Which PHP function retrieves a list of HTTP headers that have been sent as part of the HTTP response or are ready to be sent?
How many elements does the array $matches from the following code contain?
1 <?php
2 $str = "The cat sat on the roof of their house.";
3
4 $matches = preg_split("/(the)/i", $str, -1,
PREG_SPLIT_DELIM_CAPTURE);
5 ?>
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();
?>
Which constant must be passed as the second argument to htmlentities() to convert single quotes (') to HTML entities?
What is the return value of the following code: substr_compare("foobar", "bar", 3);
When comparing prepared statements and regular, application-constructed SQL statements, which of the following is true?
Some databases support the LIMIT clause. It is a method to ensure that ...
What is the output of the following script?
1 <?php
2 class a
3 {
4 public $val;
5 }
6
7 function renderVal (a $a)
8 {
9 if ($a) {
10 echo $a->val;
11 }
12 }
13
14 renderVal (null);
15 ?>
What function should be used to escape command line arguments that are passed to commands executed from PHP?
Which of the following statements about PHP is true? (Choose 3)
a) A final class can be derived.
b) A final class may be instantiated.
c) A class with a final function may be derived.
d) Static functions can be final.
e) Properties can be final.
When working with the MVC paradigma, the business logic should be implemented in which of the following components?
What is the output of the following code?
$first = "second";
$second = "first";
echo $$$first;
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?
Which elements does the array returned by the function pathinfo() contain?
You want to access the 3rd character of a string, contained in the variable $test. Which of the following possibilities work?(Choose 2)