3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a=['x','y','z']; while(@$i++<count($a)) echo $a[$i-1]; echo "\n"; echo implode(null,$a); echo "\n"; foreach($a as $e) echo $e; echo "\n"; for($i=0;$i<count($a);$i++) echo $a[$i]; echo "\n"; function f($e){echo $e;} array_walk($a,"f"); echo "\n"; // for debugging var_dump($a); print_r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 2
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 19, Position 2 = 22
Branch analysis from position: 19
2 jumps found. (Code = 78) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 26
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 26
Branch analysis from position: 32
Branch analysis from position: 26
Branch analysis from position: 22
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 2
Branch analysis from position: 11
Branch analysis from position: 2
filename:       /in/LsN83
function name:  (null)
number of ops:  45
compiled vars:  !0 = $a, !1 = $i, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1      > JMP                                                      ->5
    6     2    >   SUB                                              ~4      !1, 1
          3        FETCH_DIM_R                                      ~5      !0, ~4
          4        ECHO                                                     ~5
    5     5    >   BEGIN_SILENCE                                    ~6      
          6        POST_INC                                         ~7      !1
          7        END_SILENCE                                              ~6
          8        COUNT                                            ~8      !0
          9        IS_SMALLER                                               ~7, ~8
         10      > JMPNZ                                                    ~9, ->2
    8    11    >   ECHO                                                     '%0A'
   10    12        INIT_FCALL                                               'implode'
         13        SEND_VAL                                                 null
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $10     
         16        ECHO                                                     $10
   12    17        ECHO                                                     '%0A'
   14    18      > FE_RESET_R                                       $11     !0, ->22
         19    > > FE_FETCH_R                                               $11, !2, ->22
         20    >   ECHO                                                     !2
         21      > JMP                                                      ->19
         22    >   FE_FREE                                                  $11
   16    23        ECHO                                                     '%0A'
   18    24        ASSIGN                                                   !1, 0
         25      > JMP                                                      ->29
         26    >   FETCH_DIM_R                                      ~13     !0, !1
         27        ECHO                                                     ~13
         28        PRE_INC                                                  !1
         29    >   COUNT                                            ~15     !0
         30        IS_SMALLER                                               !1, ~15
         31      > JMPNZ                                                    ~16, ->26
   20    32    >   ECHO                                                     '%0A'
   23    33        INIT_FCALL                                               'array_walk'
         34        SEND_REF                                                 !0
         35        SEND_VAL                                                 'f'
         36        DO_ICALL                                                 
   25    37        ECHO                                                     '%0A'
   28    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !0
         40        DO_ICALL                                                 
   29    41        INIT_FCALL                                               'print_r'
         42        SEND_VAR                                                 !0
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LsN83
function name:  f
number of ops:  3
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        ECHO                                                     !0
          2      > RETURN                                                   null

End of function f

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.42 ms | 1400 KiB | 21 Q