Consider the following two files. When you run test.php, what would the output look like?
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();
?>
After performing the following operations:
$a = array('a', 'b', 'c');
$a = array_keys(array_flip($a));
What will be the value of $a?
What is the output of the following code?
What is the name of the key in $_FILES['name'] that contains the number of bytes of the uploaded file?
After executing a query on a database server, PHP offers several functions to read the resulting lines, such as mysqli_fetch_assoc, pg_fetch_row, oci_fetch,etc.). If such functions do not return any rows, it means: (Choose 2)
What will be the result of the following operation?
array_combine(array("A","B","C"), array(1,2,3));
Given the following two functions, what statement is correct?
function dynamicNew($name) {
return new $name;
}
function reflectionNew($name) {
$r = new ReflectionClass($name);
return $r->newInstanceArgs();
}
What is the output of the following code?
Which one of the following technologies was not built into PHP before version 5?
How can the constant defined below be accessed from within PHP?
class myClass {
const FOO = 'BAR';
}
Consider the following code. Which keyword should be used in the line marked in bold to make this code work as intended?
Which of these protocols are NOT governed by the W3C in their latest versions? (Choose 2)
What does the chown() function do?
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 filtering techniques prevents cross-site scripting (XSS) vulnerabilities?
What is the output of the following code?
$first = "second";
$second = "first";
echo $$$first;
Transactions are used to:
Is the following code piece E_STRICT compliant?
final class Testing {
private $test;
public function tester() {
return "Tested!";
}}
What DOM method is used to load HTML files?
Which parts of the text are matched in the following regular expression?
What object method specifies post-serialization behavior for an object?
Identify the security vulnerability in the following example:
1
2 echo "Welcome, {$_POST['name']}.";
3 ?>
Can calls to Web Services be queued natively in PHP?
Which of the following statements is NOT true?
a) Class constants are public
b) Class constants are being inherited
c) Class constants can omit initialization (default to NULL)
d) Class constants can be initialized by consts
The following form is loaded in a browser and submitted, with the checkbox activated:
How do you allow the caller to submit a variable number of arguments to a function?
What do bytecode caches do?
What SimpleXML function is used to parse a file?
What is the purpose of the open_basedir directive?
What is the result of the following code?
Webservices are primarily meant to support
Your application needs to handle file uploads performed with HTTP PUT. How can you retrieve this data?
What is the output of the following code?
Some databases support the LIMIT clause. It is a method to ensure that ...
PHP's array functions such as array_values() and array_key_exists() can be used on an object if the object...
What will the following function call return?
strstr(' ', '/');