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