3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('foo','bar','key'=> array('piff','puff','paff')); var_dump('TEST 1'); ///foreach($array as $key) {var_dump($key);} var_dump('TEST 2'); foreach($array[0] as $key) {var_dump($key);} var_dump('TEST 3'); foreach($array['key'] as $key) {var_dump($key);}
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
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 14
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: 14
filename:       /in/eCmW8
function name:  (null)
number of ops:  27
compiled vars:  !0 = $array, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAL                                                 'TEST+1'
          3        DO_ICALL                                                 
    7     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAL                                                 'TEST+2'
          6        DO_ICALL                                                 
    8     7        FETCH_DIM_R                                      ~5      !0, 0
          8      > FE_RESET_R                                       $6      ~5, ->14
          9    > > FE_FETCH_R                                               $6, !1, ->14
         10    >   INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > JMP                                                      ->9
         14    >   FE_FREE                                                  $6
    9    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAL                                                 'TEST+3'
         17        DO_ICALL                                                 
   10    18        FETCH_DIM_R                                      ~9      !0, 'key'
         19      > FE_RESET_R                                       $10     ~9, ->25
         20    > > FE_FETCH_R                                               $10, !1, ->25
         21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                                 
         24      > JMP                                                      ->20
         25    >   FE_FREE                                                  $10
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.19 ms | 1396 KiB | 15 Q