php-8.0.30-src/ext/opcache/tests/switch_with_coinciding_targ...

24 lines
315 B
PHP

--TEST--
Switch where all targets, including default, coincide
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$foo = 42.0;
$bar = true;
switch ($foo) {
default:
case 0: case 1: case 2: case 3:
if ($bar) {
echo "true\n";
} else {
echo "false\n";
}
}
?>
--EXPECT--
true