12m 00s
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: 714
What is the output of the following code:
function myFunc() { $in = "nothing"; return func_get_args(); } $in = "something"; var_dump(myFunc($in));
ID: 172
Consider the PHP program (which includes a file specified by request):
<?php $color = 'blue'; if (isset( $_GET['COLOR'] ) ) $color = $_GET['COLOR']; require( $color . '.php' ); ?> <form method="get"> <select name="COLOR"> <option value="red">red</option> <option value="blue">blue</option> </select> <input type="submit"> </form>
A malicious user injects the following command:
ID: 483
Which of the following session save handlers are available by default in PHP? (choose 3)
ID: 298
Which of the following file functions can be used to indicate the current position of the file read/write pointer?
fread()
feof()
ftell()
fseek()
ID: 588
The __ keyword is used to indicate an incomplete class or method, which must be further extended and/or implemented in order to be used.
ID: 695
What happens when the script below is executed ?
namespace CustomArea; error_reporting(E_ALL); ini_set("display_errors", "on"); function var_dump($a) { return str_replace("Weird", $a, "Weird stuff can happen"); } $a = "In programming"; echo var_dump($a);
ID: 438
What is the output of the following code?
$pattern = '/[a-z]{4} /'; $string = 'Mary had a little lamb'; $matches = preg_match($pattern, $string); print_r($matches);
ID: 677
Which PCRE regular expression will match the string PhP5-rocks?
ID: 738
Your PHP scripts is repeatedly parseing 50kb of data returned from a remote web service into browser-redable HTML. Users complain that the script takes a long time to run. Which of the following measures usually leads to the best results? (Choose 2)