xref: /PHP-8.2/ext/opcache/tests/bug79412.phpt (revision e9f783fc)
1--TEST--
2Bug #79412 (Opcache chokes and uses 100% CPU on specific script)
3--INI--
4opcache.enable=1
5opcache.optimization_level=-1
6--EXTENSIONS--
7opcache
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--
23Warning: Undefined variable $foo in %s on line %d
24
25Warning: foreach() argument must be of type array|object, null given in %s on line %d
26