xref: /PHP-7.2/Zend/tests/bug52940.phpt (revision 17ccbeec)
1--TEST--
2Bug #52940 (call_user_func_array still allows call-time pass-by-reference)
3--FILE--
4<?php
5function foo($a) {
6	$a++;
7	var_dump($a);
8}
9function bar(&$a) {
10        $a++;
11        var_dump($a);
12}
13$a = 1;
14call_user_func_array("foo", array(&$a));
15var_dump($a);
16call_user_func_array("bar", array(&$a));
17var_dump($a);
18?>
19--EXPECT--
20int(2)
21int(1)
22int(2)
23int(2)
24