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 $$array['bar']; echo PHP_EOL; echo ${test()}; echo PHP_EOL; echo $test(); echo PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DRIv8
function name:  (null)
number of ops:  20
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        FETCH_R                      local               ~7      !1
          7        FETCH_DIM_R                                      ~8      ~7, 'bar'
          8        ECHO                                                     ~8
   14     9        ECHO                                                     '%0A'
   15    10        INIT_FCALL                                               'test'
         11        DO_FCALL                                      0  $9      
         12        FETCH_R                      local               ~10     $9
         13        ECHO                                                     ~10
   16    14        ECHO                                                     '%0A'
   17    15        INIT_DYNAMIC_CALL                                        !2
         16        DO_FCALL                                      0  $11     
         17        ECHO                                                     $11
   18    18        ECHO                                                     '%0A'
         19      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DRIv8
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:
157.69 ms | 1402 KiB | 14 Q