summaryrefslogtreecommitdiff
path: root/Zend/tests/bug71756.phpt
blob: 1f43c082f0eb134213f4317b782ecbf7d2b8f36c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--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'));
?>
--EXPECT--
array(1) {
  ["bla"]=>
  string(7) "changed"
}