php-src/ext/opcache/tests/bug77257.phpt
Christoph M. Becker 3e25ddb07b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add missing SKIPIFs
2019-07-01 18:12:28 +02:00

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)