3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foreachExampleArray = $splitExampleArray = $intersectExampleArray = $originalArray = range(0, 9); foreach ($foreachExampleArray as $item) { if ($item > 4) { unset($foreachExampleArray[$item]); } } var_dump($foreachExampleArray); var_dump(array_slice($splitExampleArray, 0, 5, true)); var_dump(array_intersect_key($intersectExampleArray, array_fill_keys(range(0, 4), 1)));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 14
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/p3I5k
function name:  (null)
number of ops:  43
compiled vars:  !0 = $foreachExampleArray, !1 = $splitExampleArray, !2 = $intersectExampleArray, !3 = $originalArray, !4 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 9
          3        DO_ICALL                                         $5      
          4        ASSIGN                                           ~6      !3, $5
          5        ASSIGN                                           ~7      !2, ~6
          6        ASSIGN                                           ~8      !1, ~7
          7        ASSIGN                                                   !0, ~8
    5     8      > FE_RESET_R                                       $10     !0, ->14
          9    > > FE_FETCH_R                                               $10, !4, ->14
    6    10    >   IS_SMALLER                                               4, !4
         11      > JMPZ                                                     ~11, ->13
    7    12    >   UNSET_DIM                                                !0, !4
    5    13    > > JMP                                                      ->9
         14    >   FE_FREE                                                  $10
   11    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
   13    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'array_slice'
         20        SEND_VAR                                                 !1
         21        SEND_VAL                                                 0
         22        SEND_VAL                                                 5
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $13     
         25        SEND_VAR                                                 $13
         26        DO_ICALL                                                 
   15    27        INIT_FCALL                                               'var_dump'
         28        INIT_FCALL                                               'array_intersect_key'
         29        SEND_VAR                                                 !2
         30        INIT_FCALL                                               'array_fill_keys'
         31        INIT_FCALL                                               'range'
         32        SEND_VAL                                                 0
         33        SEND_VAL                                                 4
         34        DO_ICALL                                         $15     
         35        SEND_VAR                                                 $15
         36        SEND_VAL                                                 1
         37        DO_ICALL                                         $16     
         38        SEND_VAR                                                 $16
         39        DO_ICALL                                         $17     
         40        SEND_VAR                                                 $17
         41        DO_ICALL                                                 
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.16 ms | 1007 KiB | 18 Q