xref: /PHP-7.4/Zend/tests/bug79979.phpt (revision 6b6c2c00)
1--TEST--
2Bug #79979 (passing value to by-ref param via CUF(A) crashes)
3--FILE--
4<?php
5call_user_func_array("str_replace", ["a", "b", "c", 0]);
6
7$cufa = "call_user_func_array";
8$cufa("str_replace", ["a", "b", "c", 0]);
9
10call_user_func_array($cufa, ["str_replace", ["a", "b", "c", 0]]);
11?>
12--EXPECTF--
13Warning: Parameter 4 to str_replace() expected to be a reference, value given in %s on line %d
14
15Warning: Parameter 4 to str_replace() expected to be a reference, value given in %s on line %d
16
17Warning: Parameter 4 to str_replace() expected to be a reference, value given in %s on line %d
18