12m 00s
ID: 446
What is the output of the following line of code?
echo "4" + 05 + 011 + ord('a');
ID: 22
Mark works as a Web Developer for Unicorn Inc. He develops an application in PHP using the following code:
switch(1) { case 1: print("Book Details"); case 2: print("Book Author"); default: print("Missing Book"); }
What will be the output of the script?
ID: 710
What happens if you execute the code below ?
class someclass { public $someprop; function __construct() { $this->someprop = 1; } } function somefunc(&$instance) { unset($instance); } $instance = new someclass(); somefunc($instance); var_dump($instance);
ID: 635
When executing system commands from PHP, what should one do to keep applications secure?
ID: 683
How can one take advantage of the time waiting for a lock during a stream access, to do other tasks using the following locking code as the base:
$retval = flock($fr, LOCK_EX);
ID: 753
Which of the following functions does not accept a stream $context parameter?
ID: 42
Which of the following functions returns current Unix timestamp?
time()
date()
localtime()
strtotime()
ID: 109
Consider the following PHP script:
$var1 = ["foo", "bar", "hello", "world", "PHP", "nice"]; $var2 = ["foo", "bar", "hello", "PHP", "nice", "language"]; echo count(array_merge(array_diff($var1, $var2), array_diff($var2, $var1)));
ID: 70
You run the following PHP script:
$array1 = array ('a' => 20, 30, 35); $array2 = array ('b' => 20, 35, 30); $array = array_intersect_assoc($array1, $array2); var_dump($array);
What will be the output?
The script will throw an error message.
array(3) { ["'a'"]=> int(20) [0]=> int(30) [1]=> int(35) }
array(0) { }
array(1) { ["'a'"]=> int(20)}
ID: 260
You are using a database named SalesDB to keep all sales records. The SalesDB database contains a table named Orders. You are required to create a new table named OldOrders and transfer all the data from the Orders table to the new table. Which of the following statements will you use to accomplish the task?
SELECT INTO
ADD INTO
INSERT INTO
IMPORT INTO