php-src/ext/opcache/tests/bug79412.phpt
Max Semenik e9f783fcdd Migrate skip checks to --EXTENSIONS--, p3
For rationale, see #6787

Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00

26 lines
525 B
PHP

--TEST--
Bug #79412 (Opcache chokes and uses 100% CPU on specific script)
--INI--
opcache.enable=1
opcache.optimization_level=-1
--EXTENSIONS--
opcache
--FILE--
<?php
$limitPerRun = 10;
foreach ($foo as $bar) {
$count = 0;
foreach ($runs as $run) {
++$count;
if ($count >= $limitPerRun) {
break;
}
}
foo($limitPerRun);
}
?>
--EXPECTF--
Warning: Undefined variable $foo in %s on line %d
Warning: foreach() argument must be of type array|object, null given in %s on line %d