1--TEST-- 2Bug #77257: value of variable assigned in a switch() construct gets lost 3--SKIPIF-- 4<?php require_once('skipif.inc'); ?> 5--FILE-- 6<?php 7function test($x) { 8 $a = false; 9 switch($x["y"]) { 10 case "a": 11 $a = true; 12 break; 13 case "b": 14 break; 15 case "c": 16 break; 17 } 18 return $a; 19} 20var_dump(test(["y" => "a"])); 21?> 22--EXPECT-- 23bool(true) 24