3v4l.org

run code in 300+ PHP versions simultaneously
<?php $fruits = [ 'citrus'=>[ 'fruit one'=>'orange', 'fruit two'=>'lime' ], 'melon'=>[ 'fruit one'=>'honeydew', 'fruit two'=>'cantaloupe' ], 'berry'=>[ 'fruit one'=>'raspberry', 'fruit two'=>'strawberry' ], 'apple'=>[ 'fruit one'=>'granny smith', 'fruit two'=>'fuji' ], ]; foreach(array_slice($fruits,0,2) as $fruitGroup) echo $fruitGroup['fruit one']."\n"; echo "\n"; foreach(array_slice($fruits,2,2) as $fruitGroup) echo $fruitGroup['fruit one']."\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 25
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
Branch analysis from position: 12
filename:       /in/XgdSB
function name:  (null)
number of ops:  27
compiled vars:  !0 = $fruits, !1 = $fruitGroup
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'array_slice'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $3      
          6      > FE_RESET_R                                       $4      $3, ->12
          7    > > FE_FETCH_R                                               $4, !1, ->12
          8    >   FETCH_DIM_R                                      ~5      !1, 'fruit+one'
          9        CONCAT                                           ~6      ~5, '%0A'
         10        ECHO                                                     ~6
         11      > JMP                                                      ->7
         12    >   FE_FREE                                                  $4
   19    13        ECHO                                                     '%0A'
   20    14        INIT_FCALL                                               'array_slice'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 2
         17        SEND_VAL                                                 2
         18        DO_ICALL                                         $7      
         19      > FE_RESET_R                                       $8      $7, ->25
         20    > > FE_FETCH_R                                               $8, !1, ->25
         21    >   FETCH_DIM_R                                      ~9      !1, 'fruit+one'
         22        CONCAT                                           ~10     ~9, '%0A'
         23        ECHO                                                     ~10
         24      > JMP                                                      ->20
         25    >   FE_FREE                                                  $8
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.6 ms | 985 KiB | 14 Q