1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/opcache/tests/bug79412.phpt
Máté Kocsis 36935e42ea Improve undefined variable error messages
Closes GH-5312
2020-03-31 13:02:32 +02:00

26 lines
550 B
PHP

--TEST--
Bug #79412 (Opcache chokes and uses 100% CPU on specific script)
--INI--
opcache.enable=1
opcache.optimization_level=-1
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--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