1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 22:11:12 +02:00
Files
archived-php-src/ext/opcache/tests/bug74431.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

31 lines
447 B
PHP

--TEST--
Bug #74431 - foreach infinite loop
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=0xffffffff
--EXTENSIONS--
opcache
--FILE--
<?php
function test(){
$arr = [1,2];
$j = 0;
$cond = true;
foreach ($arr as $i => $v){
while(1){
if($cond){
break;
}
}
$j++;
echo $j."\n";
if ($j>10) break;
}
}
test();
?>
--EXPECT--
1
2