Main Snake Zend Zend Questions Exam Quicktest MZend Zend-Race

12m 00s


Question: 1 (ID:178)

ID: 178


Fill in the blank with the appropriate PHP function. The _____ function is used to replace the current session id with the new session id, and to keep information of the current session. *Matching is case-insensitive.





Question: 2 (ID:248)

ID: 248


Which of the following prepared query strings is used to execute a prepared statement?





Question: 3 (ID:804)

ID: 804


What is the output of the following code?


                        
function func($x, $x = 2, $x = 3)   {
    return $x;
}
echo func(3);                    



Question: 4 (ID:434)

ID: 434


Which of the following is a valid way to pass the $callback parameter expected by array_walk()? (choose three)





Question: 5 (ID:769)

ID: 769


What is the output of the following code?


                        
class A {
    protected $a = '';
    function x() {
        echo ++$this->a;
    }
}
$a = new A();
$b = $a;
$c = new A();
$b->x();
$a->x();
$c->x();
$b = $c;
$b->x();
$a->x();                    



Question: 6 (ID:607)

ID: 607


What would go in place of ?????? below to make this script execute without a fatal error?


                        
$a = 1;
$b = 0;    
/* ?????? */    
$c = $a / $b;                    



Question: 7 (ID:313)

ID: 313


What is output of the following PHP script?


                        
$str = 'foo';
$str .= 'bar';
$num = 0;
$num += 25;
$num -= 15;
echo $str . ' - ' . $num;                    



Question: 8 (ID:743)

ID: 743


What will this code do?


                        
$var = 2;
$str = 'aabbccddeeaabbccdd';
echo str_replace('a', 'z', $str, $var);                    



Question: 9 (ID:400)

ID: 400


The following script defines a function called buildUrl(), which is intended to be a crude way of normalizing URLs. What line of code must be inserted into buildUrl() to ensure $url1 and code $url2 are both equal to http://phpriot.com/quiz/?


                        
function buildUrl($domain, $path) {
    // insert line of code here
    return $ret;
}

$domain1 = 'http://phpriot.com/';
$domain2 = 'http://phpriot.com';
$path    = '/quiz/';

$url1 = buildUrl($domain1, $path);
$url2 = buildUrl($domain2, $path);                    



Question: 10 (ID:280)

ID: 280


What is the maximum limit of the file size that a user can upload according to the code snippet given below?


                        
<form enctype="multipart/form-data" action="index.php" method="post">
   <input type="hidden" name="MAX_FILE_SIZE" value="5000" />
   <input name="filedata" type="file" />
   <input type="submit" value="Send file" />
</form>