mirror of
https://github.com/php/php-src.git
synced 2026-04-24 00:18:23 +02:00
91888cc372
Correctly handle the case of duplicate predecessors, by removing the duplicate predecessor and corresponding phi node operands. For the future, it would be better to instead allow duplicate predecessors and avoid this kind of fragile code...
22 lines
367 B
PHP
22 lines
367 B
PHP
--TEST--
|
|
Bug #77257: value of variable assigned in a switch() construct gets lost
|
|
--FILE--
|
|
<?php
|
|
function test($x) {
|
|
$a = false;
|
|
switch($x["y"]) {
|
|
case "a":
|
|
$a = true;
|
|
break;
|
|
case "b":
|
|
break;
|
|
case "c":
|
|
break;
|
|
}
|
|
return $a;
|
|
}
|
|
var_dump(test(["y" => "a"]));
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|