1--TEST--
2Crash when function parameter modified via unexpected reference
3--FILE--
4<?php
5class Test {
6    public function __toString() {
7        global $my_var;
8        $my_var = 0;
9        return ",";
10    }
11}
12$my_var = str_repeat("A", 64);
13$data = call_user_func_array("explode", array(new Test(), &$my_var));
14$my_var = str_repeat("A", 64);
15$data = call_user_func_array("str_replace", array(&$my_var, new Test(), "foo"));
16echo "Done.\n";
17?>
18--EXPECT--
19Done.
20