3v4l.org

run code in 500+ 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 = 16, Position 2 = 19
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 23
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 23
Branch analysis from position: 29
Branch analysis from position: 23
Branch analysis from position: 19
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:  42
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        FRAMELESS_ICALL_2                implode             ~10     null, !0
         13        ECHO                                                         ~10
   12    14        ECHO                                                         '%0A'
   14    15      > FE_RESET_R                                           $11     !0, ->19
         16    > > FE_FETCH_R                                                   $11, !2, ->19
         17    >   ECHO                                                         !2
         18      > JMP                                                          ->16
         19    >   FE_FREE                                                      $11
   16    20        ECHO                                                         '%0A'
   18    21        ASSIGN                                                       !1, 0
         22      > JMP                                                          ->26
         23    >   FETCH_DIM_R                                          ~13     !0, !1
         24        ECHO                                                         ~13
         25        PRE_INC                                                      !1
         26    >   COUNT                                                ~15     !0
         27        IS_SMALLER                                                   !1, ~15
         28      > JMPNZ                                                        ~16, ->23
   20    29    >   ECHO                                                         '%0A'
   23    30        INIT_FCALL                                                   'array_walk'
         31        SEND_REF                                                     !0
         32        SEND_VAL                                                     'f'
         33        DO_ICALL                                                     
   25    34        ECHO                                                         '%0A'
   28    35        INIT_FCALL                                                   'var_dump'
         36        SEND_VAR                                                     !0
         37        DO_ICALL                                                     
   29    38        INIT_FCALL                                                   'print_r'
         39        SEND_VAR                                                     !0
         40        DO_ICALL                                                     
         41      > 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.5.0


preferences:
166.53 ms | 2210 KiB | 18 Q