What PHP function can be used to remove a local file?
Can a private static member be accessed from a public static method of the same class?
How can you determine if magic_quotes_gpc is enabled? (Choose 2)
Which of the following is NOT a valid function declaration?
What function allows resizing of PHP's file write buffer?
Transactions are used to:
What is the output of the following script?
1
2 function fibonacci (&$x1 = 0, &$x2 = 1)
3 {
4 $result = $x1 + $x2;
5 $x1 = $x2;
6 $x2 = $result;
7
8 return $result;
9 }
10
11 for ($i = 0; $i < 10; $i++) {
12 echo fibonacci() . ',';
13 }
14 ?>
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?
Which of the following rules must every correct XML document adhere to? (Choose 2)
PHP's array functions such as array_values() and array_key_exists() can be used on an object if the object...
What XML component does the following XPath query try to match?
//foo[bar/@id=5]
What will be the output of the following code?
$a = array(0, 1, 2 => array(3, 4));
$a[3] = array(4, 5);
echo count($a, 1);
When a transaction reports no affected rows, it means that: (Choose 2)
In the following code, which class can be instantiated?
1
2 abstract class Graphics {
3 abstract function draw($im, $col);
4 }
5
6 abstract class Point1 extends Graphics {
7 public $x, $y;
8 function __construct($x, $y) {
9 $this->x = $x;
10 $this->y = $y;
11 }
12 function draw($im, $col) {
13 ImageSetPixel($im, $this->x, $this->y, $col);
14 }
15 }
16
17 class Point2 extends Point1 { }
18
19 abstract class Point3 extends Point2 { }
20 ?>
What is the output of the following code?
str_pad('PHP', 10, 'P', STR_PAD_BOTH);
Where does the session extension store the session data by default?
Would the following code catch a parse error?
try {
echo $label
} catch (Exception $e) {
echo $e->getMessage();
}
When working with the MVC paradigma, the business logic should be implemented in which of the following components?
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?
What is the function of backtick (`) characters in PHP?
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 super-global should be used to access information about uploaded files via a POST request?
Webservices are primarily meant to support
A script residing at http://example.com/phpcert/cookies.php contains the following code:
1
2 setcookie('name1', 'value1', time() + 60*60*24, '/');
3 setcookie('name1', 'value2');
4 ?>
The web browser is configured to accept all cookies. How many cookies will be set by this script?
In the function setcookie() what does the 3rd parameter specify?
How can precisely one byte be read from a file, pointed by $fp? (Choose 2)
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 2.17of the following formats is used to describe web services?
Which of the following techniques ensures that a value submitted in a form can only be yes or no?
Which one of the following technologies was not built into PHP before version 5?
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 ?>