xref: /PHP-7.4/ext/opcache/tests/bug79412.phpt (revision 65120cfc)
1--TEST--
2Bug #79412 (Opcache chokes and uses 100% CPU on specific script)
3--INI--
4opcache.enable=1
5opcache.optimization_level=-1
6--SKIPIF--
7<?php require_once('skipif.inc'); ?>
8--FILE--
9<?php
10$limitPerRun = 10;
11foreach ($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--
23Notice: Undefined variable: foo in %s on line %d
24
25Warning: Invalid argument supplied for foreach() in %s on line %d
26