Main Snake Zend Zend Questions Exam Quicktest MZend Zend-Race

12m 00s


Question: 1 (ID:124)

ID: 124


Which of the following statements correctly explains the use of instanceof and type hinting? Each correct answer represents a complete solution (Choose three).





Question: 2 (ID:282)

ID: 282


What will be the output of the following PHP code?


                        
array_combine([1,2,3], [4,5,6]);                    



Question: 3 (ID:205)

ID: 205


Which of the following is a valid SOAP client call?





Question: 4 (ID:708)

ID: 708


What is the best way to store and verify passwords in PHP ?





Question: 5 (ID:394)

ID: 394


Remembering that keys are not reset when using natsort(), what is the output of the following PHP script?


                        
$filenames = array(
    'img12.png',
    'img7.png',
    'img21.png',
    'img1.png'
);

natsort($filenames);
$values = array_values($filenames);
echo $values[1];                    

Enter the exact script output



Question: 6 (ID:764)

ID: 764


Reflection functions CANNOT do:





Question: 7 (ID:231)

ID: 231


What will be the output of the following PHP code snippet?


                        
echo <<<"FOOBAR"
Hello World!
FOOBAR;                    



Question: 8 (ID:614)

ID: 614


What is the result of the following code snippet?


                        
$array = array(
    'a' => 'John',
    'b' => 'Coggeshall',
    'c' => array(
        'd' => 'John',
        'e' => 'Smith'
    )
);

function something($array) {
    extract($array);
    return $c['e'];
}

print something($array);                    



Question: 9 (ID:779)

ID: 779


What will the following code print on the screen?


                        
class MyEx1 extends Exception {}
class MyEx2 extends MyEx1 {}

function checkValue(float $a): void {
    if ($a < 10) {
        throw new MyEx1('too small.');
    }
}

try {
    checkValue(50);
    checkValue(5);
} catch (MyEx2 $e) {
    echo $e->getMessage();
} catch (Exception | MyEx1 $e) {
    echo get_class($e);
} finally {
    echo 'End';
}                    



Question: 10 (ID:468)

ID: 468


What is the output of the following code?


                        
function format(&$item) {
   $item = strtoupper($item) . '.';
   return $item;
}
$shopping = array("fish", "bread", "eggs", "jelly", "apples");
array_walk($shopping, "format");
$shopping = sort($shopping);
echo $shopping[1];