mirror of
https://github.com/php/php-src.git
synced 2025-01-10 04:54:47 +08:00
3e25ddb07b
* PHP-7.2: Add missing SKIPIFs
24 lines
415 B
PHP
24 lines
415 B
PHP
--TEST--
|
|
Bug #77257: value of variable assigned in a switch() construct gets lost
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--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)
|