mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Added test case for bug #21600
This commit is contained in:
parent
58d3451c75
commit
22a6b8f1a4
19
tests/lang/bug21600.phpt
Normal file
19
tests/lang/bug21600.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #21600 (assign by reference function call changes variable contents)
|
||||
--FILE--
|
||||
<?php
|
||||
$tmp = array();
|
||||
$tmp['foo'] = "test";
|
||||
$tmp['foo'] = &bar($tmp['foo']);
|
||||
var_dump($tmp);
|
||||
|
||||
function bar($text){
|
||||
return $text;
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
string(4) "test"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user