switch_with_coinciding_targets.phpt 315 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Switch where all targets, including default, coincide
  3. --SKIPIF--
  4. <?php require_once('skipif.inc'); ?>
  5. --FILE--
  6. <?php
  7. $foo = 42.0;
  8. $bar = true;
  9. switch ($foo) {
  10. default:
  11. case 0: case 1: case 2: case 3:
  12. if ($bar) {
  13. echo "true\n";
  14. } else {
  15. echo "false\n";
  16. }
  17. }
  18. ?>
  19. --EXPECT--
  20. true