Which of the following may be used in conjunction with CASE inside a SWITCH statement?
Which of the following data types cannot be directly manipulated by the client?
PHP’s array functions such as array_values() can be used on an object is the oject….
Which of the following encryption standards provides symmetric key encryption? (Choose 2)
Some databases support the LIMIT clause. It is a method to ensure that ...
How can the constant defined below be accessed from within PHP?
class myClass {
const FOO = 'BAR';
}
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;
What function is ideal for outputting contents of a static file to screen?
Consider the following code. What can be said about the call to file_get_contents?
What function can be used to retrieve an array of current options for a stream context?
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 ?>
How many elements does the $matches array contain after the following function call is performed?
preg_match('/^(\d{1,2}([a-z]+))(?:\s*)\S+ (?=200[0-9])/', '21st March
2006', $matches);
How can the line on which HTTP headers were sent inside a script be determined?
Given the following array:
$a = array(28, 15, 77, 43);
Which function will remove the value 28 from $a?
When a browser requests an image identified by an img tag, it never sends a Cookie header.
Type hinting in PHP allows the identification of the following variable types: (Choose 2)
When retrieving data from URLs, what are valid ways to make sure all file_get_contents calls send a certain user agent string? (Choose 2)
When working with the MVC paradigma, the business logic should be implemented in which of the following components?
What is the return value of the following code?
strpos("me myself and I", "m", 2)
What is the output of the following script?
1
2 class a
3 {
4 public $val = 10;
5 }
6
7 function renderVal (a $a)
8 {
9 return $a->$val;
10 }
11
12 renderVal (new a);
13 ?>