bug79412.phpt 525 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Bug #79412 (Opcache chokes and uses 100% CPU on specific script)
  3. --INI--
  4. opcache.enable=1
  5. opcache.optimization_level=-1
  6. --EXTENSIONS--
  7. opcache
  8. --FILE--
  9. <?php
  10. $limitPerRun = 10;
  11. foreach ($foo as $bar) {
  12. $count = 0;
  13. foreach ($runs as $run) {
  14. ++$count;
  15. if ($count >= $limitPerRun) {
  16. break;
  17. }
  18. }
  19. foo($limitPerRun);
  20. }
  21. ?>
  22. --EXPECTF--
  23. Warning: Undefined variable $foo in %s on line %d
  24. Warning: foreach() argument must be of type array|object, null given in %s on line %d