Main Snake Zend Zend Questions Exam Quicktest MZend Zend-Race

12m 00s


Question: 1 (ID:710)

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);                    



Question: 2 (ID:714)

ID: 714


What is the output of the following code:


                        
function myFunc() {
    $in = "nothing";
    return func_get_args();
}
$in = "something";
var_dump(myFunc($in));                    



Question: 3 (ID:172)

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:



Question: 4 (ID:483)

ID: 483


Which of the following session save handlers are available by default in PHP? (choose 3)





Question: 5 (ID:298)

ID: 298


Which of the following file functions can be used to indicate the current position of the file read/write pointer?





Question: 6 (ID:588)

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.





Question: 7 (ID:695)

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);                    



Question: 8 (ID:438)

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);                    



Question: 9 (ID:677)

ID: 677


Which PCRE regular expression will match the string PhP5-rocks?





Question: 10 (ID:738)

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)