xref: /PHP-5.5/ext/standard/tests/array/bug23788.phpt (revision 380bf699)
1--TEST--
2Bug #23788 (*_replace() clobbers referenced array elements)
3--FILE--
4<?php
5$numeric = 123;
6$bool = true;
7$foo = array(&$numeric, &$bool);
8var_dump($foo);
9str_replace("abc", "def", $foo);
10var_dump($foo);
11?>
12--EXPECT--
13array(2) {
14  [0]=>
15  &int(123)
16  [1]=>
17  &bool(true)
18}
19array(2) {
20  [0]=>
21  &int(123)
22  [1]=>
23  &bool(true)
24}
25