mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
For rationale, see #6787 Extensions migrated in part 3: * ftp * gmp * iconv * opcache * shmop
24 lines
390 B
PHP
24 lines
390 B
PHP
--TEST--
|
|
Bug #77257: value of variable assigned in a switch() construct gets lost
|
|
--EXTENSIONS--
|
|
opcache
|
|
--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)
|