xref: /PHP-7.3/Zend/tests/bug71756.phpt (revision ded3d984)
1--TEST--
2Bug #71756 (Call-by-reference widens scope to uninvolved functions when used in switch)
3--FILE--
4<?php
5function a ($option) {
6	b($option['bla']);
7	c($option);
8	var_dump($option);
9}
10function b (&$string) {
11	$string = 'changed';
12}
13function c ($option) {
14	switch ($option['bla']) {
15	case 'changed':
16		$copy = $option;
17		$copy['bla'] = 'copy';
18		break;
19	}
20}
21a(array('bla' => 'false'));
22?>
23--EXPECT--
24array(1) {
25  ["bla"]=>
26  string(7) "changed"
27}
28