Annotation of embedaddon/php/Zend/tests/028.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Testing function call through of array item
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: $arr = array('strtoupper', 'strtolower');
        !             7: 
        !             8: $k = 0;
        !             9: 
        !            10: var_dump($arr[0]('foo') == 'FOO');
        !            11: var_dump($arr[$k]('foo') == 'FOO');
        !            12: var_dump($arr[++$k]('FOO') == 'foo');
        !            13: var_dump($arr[++$k]('FOO') == 'foo');
        !            14: 
        !            15: ?>
        !            16: --EXPECTF--
        !            17: bool(true)
        !            18: bool(true)
        !            19: bool(true)
        !            20: 
        !            21: Notice: Undefined offset: 2 in %s on line %d
        !            22: 
        !            23: Fatal error: Function name must be a string in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>