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

1.1     ! misho       1: --TEST--
        !             2: Bug #46409 (__invoke method called outside of object context when using array_map)
        !             3: --FILE--
        !             4: <?php
        !             5: class Callback {
        !             6:     protected $val = 'hello, world';
        !             7:     
        !             8:     public function __invoke() {
        !             9:         return $this->val;
        !            10:     }
        !            11: }
        !            12: 
        !            13: $cb = new Callback();
        !            14: echo $cb(),"\n";
        !            15: $a = array(1, 2);
        !            16: $b = array_map($cb, $a);
        !            17: print_r($b);
        !            18: ?>
        !            19: --EXPECT--
        !            20: hello, world
        !            21: Array
        !            22: (
        !            23:     [0] => hello, world
        !            24:     [1] => hello, world
        !            25: )

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