3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testing = 'foo'; $array = ['bar' => 'testing']; function test() { return 'testing'; } class Test { public function output() { echo 'called'; } } $string = 'test'; $test = new Test(); echo ${$array['bar']}; echo PHP_EOL; echo $$array['bar']; echo PHP_EOL; echo ${test()}; echo PHP_EOL; echo $test(); echo PHP_EOL; echo $$string->output();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/davG9
function name:  (null)
number of ops:  28
compiled vars:  !0 = $testing, !1 = $array, !2 = $string, !3 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo'
    4     1        ASSIGN                                                   !1, <array>
   18     2        ASSIGN                                                   !2, 'test'
   20     3        NEW                                              $7      'Test'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !3, $7
   21     6        FETCH_DIM_R                                      ~10     !1, 'bar'
          7        FETCH_R                      local               ~11     ~10
          8        ECHO                                                     ~11
   22     9        ECHO                                                     '%0A'
   23    10        FETCH_R                      local               ~12     !1
         11        FETCH_DIM_R                                      ~13     ~12, 'bar'
         12        ECHO                                                     ~13
   24    13        ECHO                                                     '%0A'
   25    14        INIT_FCALL                                               'test'
         15        DO_FCALL                                      0  $14     
         16        FETCH_R                      local               ~15     $14
         17        ECHO                                                     ~15
   26    18        ECHO                                                     '%0A'
   27    19        INIT_DYNAMIC_CALL                                        !3
         20        DO_FCALL                                      0  $16     
         21        ECHO                                                     $16
   28    22        ECHO                                                     '%0A'
   29    23        FETCH_R                      local               ~17     !2
         24        INIT_METHOD_CALL                                         ~17, 'output'
         25        DO_FCALL                                      0  $18     
         26        ECHO                                                     $18
         27      > RETURN                                                   1

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

Class Test:
Function output:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/davG9
function name:  output
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   ECHO                                                     'called'
   16     1      > RETURN                                                   null

End of function output

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.42 ms | 1399 KiB | 14 Q