1--TEST-- 2Bug #81512: Unexpected behavior with arrays and JIT 3--INI-- 4opcache.enable=1 5opcache.enable_cli=1 6opcache.file_update_protection=0 7--FILE-- 8<?php 9$pipe = [['val1'],['val2'],]; 10 11for ($i = 0; $i < 30; ++$i) { 12 echo "$i "; 13 if (!is_pipeline($pipe)) { 14 echo 'ERROR '; 15 } 16} 17 18function is_pipeline($pipeline): bool { 19 foreach ($pipeline as $stage) { 20 if (!is_array($stage)) { 21 return false; // must never happen 22 } 23 24 $stage = (array) $stage; 25 reset($stage); 26 } 27 28 return true; 29} 30?> 31--EXPECT-- 320 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 33