3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testing = 'foo'; $array = ['bar' => 'testing']; function test() { return 'testing'; } echo ${$array['bar']}; echo PHP_EOL; echo ${test()}; echo $test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JbMGC
function name:  (null)
number of ops:  14
compiled vars:  !0 = $testing, !1 = $array, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo'
    4     1        ASSIGN                                                   !1, <array>
   11     2        FETCH_DIM_R                                      ~5      !1, 'bar'
          3        FETCH_R                      local               ~6      ~5
          4        ECHO                                                     ~6
   12     5        ECHO                                                     '%0A'
   13     6        INIT_FCALL                                               'test'
          7        DO_FCALL                                      0  $7      
          8        FETCH_R                      local               ~8      $7
          9        ECHO                                                     ~8
   14    10        INIT_DYNAMIC_CALL                                        !2
         11        DO_FCALL                                      0  $9      
         12        ECHO                                                     $9
         13      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JbMGC
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   'testing'
    9     1*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.42 ms | 1397 KiB | 14 Q