bug74152.phpt 345 B

123456789101112131415161718192021222324252627
  1. --TEST--
  2. Bug #74152 (if statement says true to a null variable)
  3. --INI--
  4. opcache.enable=1
  5. opcache.enable_cli=1
  6. opcache.optimization_level=-1
  7. --EXTENSIONS--
  8. opcache
  9. --FILE--
  10. <?php
  11. $foo = 'foo';
  12. $bar = null;
  13. switch ($foo) {
  14. default:
  15. case 'foo':
  16. if ($bar) {
  17. echo 'true';
  18. } else {
  19. echo 'false';
  20. }
  21. }
  22. ?>
  23. --EXPECT--
  24. false