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

1.1     ! misho       1: --TEST--
        !             2: Testing array dereference on __invoke() result
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: error_reporting(E_ALL);
        !             7: 
        !             8: class foo {
        !             9:        public $x = array();
        !            10:        public function __construct() {
        !            11:                $h = array();
        !            12:                $h[] = new stdclass;
        !            13:                $this->x = $h;
        !            14:        }
        !            15:        public function __invoke() {
        !            16:                return $this->x;
        !            17:        }
        !            18: }
        !            19: 
        !            20: 
        !            21: $fo = new foo;
        !            22: var_dump($fo()[0]);
        !            23: 
        !            24: ?>
        !            25: --EXPECTF--
        !            26: object(stdClass)#%d (0) {
        !            27: }

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