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 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 21
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 21
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 32
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Branch analysis from position: 21
Branch analysis from position: 10
filename:       /in/DdpBG
function name:  (null)
number of ops:  34
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                                                 
    6     4      > FE_RESET_R                                       $4      !0, ->10
          5    > > FE_FETCH_R                                               $4, !1, ->10
          6    >   INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > JMP                                                      ->5
         10    >   FE_FREE                                                  $4
    7    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAL                                                 'TEST+2'
         13        DO_ICALL                                                 
    8    14        FETCH_DIM_R                                      ~7      !0, 0
         15      > FE_RESET_R                                       $8      ~7, ->21
         16    > > FE_FETCH_R                                               $8, !1, ->21
         17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > JMP                                                      ->16
         21    >   FE_FREE                                                  $8
    9    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAL                                                 'TEST+3'
         24        DO_ICALL                                                 
   10    25        FETCH_DIM_R                                      ~11     !0, 'key'
         26      > FE_RESET_R                                       $12     ~11, ->32
         27    > > FE_FETCH_R                                               $12, !1, ->32
         28    >   INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
         31      > JMP                                                      ->27
         32    >   FE_FREE                                                  $12
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.63 ms | 945 KiB | 16 Q