3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array_1 = ['A', 'B', 'C', 'D', 'E', 'F']; $array_2 = ['B','C', 'D']; $i = 0; $check = false; $match = true; foreach($array_2 as $a){ if($check==false){ for($j=0;$j<sizeof($array_1)-1;$j++){ if($array_1[$j]==$a){ $i=$j+1; $check = true; } } }else{ if($a==$array_1[$i]){ $i++; }else{ $match = false; break; } } } if($match) echo 'true'; else echo 'false';
Output for git.master, git.master_jit, rfc.property-hooks
true

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
43.01 ms | 1730 KiB | 4 Q