diff --git a/ext/opcache/tests/bug74431.phpt b/ext/opcache/tests/bug74431.phpt new file mode 100644 index 00000000000..40948bac212 --- /dev/null +++ b/ext/opcache/tests/bug74431.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #74431 - foreach infinite loop +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=0xffffffff +--FILE-- + $v){ + while(1){ + if($cond){ + break; + } + } + $j++; + echo $j."\n"; + if ($j>10) break; + } +} +test(); +?> +--EXPECT-- +1 +2