mirror of
https://github.com/php/php-src.git
synced 2026-04-10 09:33:06 +02:00
If a by-val send is not allowed, we must not do so. Instead we wrap the value in a temporary reference. Closes GH-6000
18 lines
587 B
PHP
18 lines
587 B
PHP
--TEST--
|
|
Bug #79979 (passing value to by-ref param via CUF(A) crashes)
|
|
--FILE--
|
|
<?php
|
|
call_user_func_array("str_replace", ["a", "b", "c", 0]);
|
|
|
|
$cufa = "call_user_func_array";
|
|
$cufa("str_replace", ["a", "b", "c", 0]);
|
|
|
|
call_user_func_array($cufa, ["str_replace", ["a", "b", "c", 0]]);
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Parameter 4 to str_replace() expected to be a reference, value given in %s on line %d
|
|
|
|
Warning: Parameter 4 to str_replace() expected to be a reference, value given in %s on line %d
|
|
|
|
Warning: Parameter 4 to str_replace() expected to be a reference, value given in %s on line %d
|