1--TEST--
2call_user_func() should error on reference arguments
3--FILE--
4<?php
5
6namespace Foo;
7
8function bar(&$ref) {
9    $ref = 24;
10}
11
12$x = 42;
13$ref =& $x;
14\call_user_func('Foo\bar', $x);
15var_dump($x);
16
17$y = 42;
18$ref =& $y;
19call_user_func('Foo\bar', $y);
20var_dump($y);
21
22?>
23--EXPECTF--
24Warning: Parameter 1 to Foo\bar() expected to be a reference, value given in %s on line %d
25int(42)
26
27Warning: Parameter 1 to Foo\bar() expected to be a reference, value given in %s on line %d
28int(42)
29