We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b760508 commit 5d095f8Copy full SHA for 5d095f8
ext/opcache/tests/bug74431.phpt
@@ -0,0 +1,28 @@
1
+--TEST--
2
+Bug #74431 - foreach infinite loop
3
+--INI--
4
+opcache.enable=1
5
+opcache.enable_cli=1
6
+opcache.optimization_level=0xffffffff
7
+--FILE--
8
+<?php
9
+function test(){
10
+ $arr = [1,2];
11
+ $j = 0;
12
+ $cond = true;
13
+ foreach ($arr as $i => $v){
14
+ while(1){
15
+ if($cond){
16
+ break;
17
+ }
18
19
+ $j++;
20
+ echo $j."\n";
21
+ if ($j>10) break;
22
23
+}
24
+test();
25
+?>
26
+--EXPECT--
27
+1
28
+2
0 commit comments