bug80046.phpt 356 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #80046: FREE for SWITCH_STRING optimized away
  3. --FILE--
  4. <?php
  5. function test($foo) {
  6. switch ($foo . 'Bar') {
  7. case 'A':
  8. throw new Exception('A');
  9. default:
  10. throw new Exception('Default');
  11. }
  12. }
  13. try {
  14. test('Foo');
  15. } catch (Exception $e) {
  16. echo $e->getMessage(), "\n";
  17. }
  18. ?>
  19. --EXPECT--
  20. Default