Annotation of embedaddon/php/ext/standard/tests/general_functions/call_user_func_return.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: call_user_func() and return value
        !             3: --FILE--
        !             4: <?php
        !             5: 
        !             6: $t1 = 'test1';
        !             7: 
        !             8: function test1($arg1, $arg2)
        !             9: {
        !            10:        global $t1;
        !            11:        echo "$arg1 $arg2\n";
        !            12:        return $t1;
        !            13: }
        !            14: 
        !            15: $t2 = 'test2';
        !            16: 
        !            17: function & test2($arg1, $arg2)
        !            18: {
        !            19:        global $t2;
        !            20:        echo "$arg1 $arg2\n";
        !            21:        return $t2;
        !            22: }
        !            23: 
        !            24: function test($func)
        !            25: {
        !            26:        debug_zval_dump($func('Direct', 'Call'));
        !            27:        debug_zval_dump(call_user_func_array($func, array('User', 'Func')));
        !            28: }
        !            29: 
        !            30: test('test1');
        !            31: test('test2');
        !            32: 
        !            33: ?>
        !            34: ===DONE===
        !            35: --EXPECTF--
        !            36: Direct Call
        !            37: string(5) "test1" refcount(1)
        !            38: User Func
        !            39: string(5) "test1" refcount(1)
        !            40: Direct Call
        !            41: string(5) "test2" refcount(2)
        !            42: User Func
        !            43: string(5) "test2" refcount(1)
        !            44: ===DONE===

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