mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
24 lines
361 B
PHP
24 lines
361 B
PHP
--TEST--
|
|
Bug #52940 (call_user_func_array still allows call-time pass-by-reference)
|
|
--FILE--
|
|
<?php
|
|
function foo($a) {
|
|
$a++;
|
|
var_dump($a);
|
|
}
|
|
function bar(&$a) {
|
|
$a++;
|
|
var_dump($a);
|
|
}
|
|
$a = 1;
|
|
call_user_func_array("foo", array(&$a));
|
|
var_dump($a);
|
|
call_user_func_array("bar", array(&$a));
|
|
var_dump($a);
|
|
?>
|
|
--EXPECT--
|
|
int(2)
|
|
int(1)
|
|
int(2)
|
|
int(2)
|