Zend PHP 5.3 Certification Exam


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
  • Question 31/36

    In the PHP script below, what line of code should be substituted with /** line **/ to achieve an output of eeeeee?

    
    <?php
        function sortByLength($a$b)
        {
            $lenA strlen($a);
            $lenB strlen($b);
    
            if ($lenA == $lenB) { return 0; }
    
            /** line **/
        }
    
        $values = array(
            'ccc',
            'a',
            'eeeeee',
            'dddd',
            'bb',
            'fffff'
        );
    
        usort($values'sortByLength');
        echo $values[5];
    ?>