3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = range(1, 20); $skip = 10; $take = 5; foreach (array_slice($json, $skip, $take) as $key => $js) { // ... do what is necessary on the data echo "$js\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/mluvJ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $json, !1 = $skip, !2 = $take, !3 = $js, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 20
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !0, $5
    4     5        ASSIGN                                                   !1, 10
    5     6        ASSIGN                                                   !2, 5
    6     7        INIT_FCALL                                               'array_slice'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $9      
         12      > FE_RESET_R                                       $10     $9, ->19
         13    > > FE_FETCH_R                                       ~11     $10, !3, ->19
         14    >   ASSIGN                                                   !4, ~11
    8    15        NOP                                                      
         16        FAST_CONCAT                                      ~13     !3, '%0A'
         17        ECHO                                                     ~13
    6    18      > JMP                                                      ->13
         19    >   FE_FREE                                                  $10
    9    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.35 ms | 1011 KiB | 15 Q