3v4l.org

run code in 500+ PHP versions simultaneously
<?php $json =[1,2,3,4,5,6,7,8,9,10,11,12,13,14]; $json =[1,2,3,4,5,6]; $arr = array_slice($json, 0,10); Foreach($arr as $val){ Echo $val ."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/7pV3X
function name:  (null)
number of ops:  15
compiled vars:  !0 = $json, !1 = $arr, !2 = $val
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !0, <array>
    5     2        INIT_FCALL                                                   'array_slice'
          3        SEND_VAR                                                     !0
          4        SEND_VAL                                                     0
          5        SEND_VAL                                                     10
          6        DO_ICALL                                             $5      
          7        ASSIGN                                                       !1, $5
    7     8      > FE_RESET_R                                           $7      !1, ->13
          9    > > FE_FETCH_R                                                   $7, !2, ->13
    8    10    >   CONCAT                                               ~8      !2, '%0A'
         11        ECHO                                                         ~8
    7    12      > JMP                                                          ->9
         13    >   FE_FREE                                                      $7
    9    14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.37 ms | 2517 KiB | 14 Q