mirror of
https://github.com/php/php-src.git
synced 2024-12-14 12:26:19 +08:00
28 lines
453 B
Plaintext
28 lines
453 B
Plaintext
|
--TEST--
|
||
|
Bug #71756 (Call-by-reference widens scope to uninvolved functions when used in switch)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
function a ($option) {
|
||
|
b($option['bla']);
|
||
|
c($option);
|
||
|
var_dump($option);
|
||
|
}
|
||
|
function b (&$string) {
|
||
|
$string = 'changed';
|
||
|
}
|
||
|
function c ($option) {
|
||
|
switch ($option['bla']) {
|
||
|
case 'changed':
|
||
|
$copy = $option;
|
||
|
$copy['bla'] = 'copy';
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
a(array('bla' => 'false'));
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
array(1) {
|
||
|
["bla"]=>
|
||
|
string(7) "changed"
|
||
|
}
|