3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { for ($n = 'a'; $n < 'g'; $n++) { $$n = array(); } $$n = array(); $$n .= "test"; return $$n; } var_dump(test2());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ZPF2
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL_BY_NAME                                       'test2'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
          5      > RETURN                                                   1

Function test:
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 = 7, Position 2 = 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
Branch analysis from position: 2
filename:       /in/4ZPF2
function name:  test
number of ops:  14
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 'a'
          1      > JMP                                                      ->5
    5     2    >   FETCH_W                      local               $2      !0
          3        ASSIGN                                                   $2, <array>
    4     4        PRE_INC                                                  !0
          5    >   IS_SMALLER                                               !0, 'g'
          6      > JMPNZ                                                    ~5, ->2
    7     7    >   FETCH_W                      local               $6      !0
          8        ASSIGN                                                   $6, <array>
    8     9        FETCH_RW                     local               $8      !0
         10        ASSIGN_OP                                     8          $8, 'test'
    9    11        FETCH_R                      local               ~10     !0
         12      > RETURN                                                   ~10
   10    13*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.2 ms | 1387 KiB | 15 Q