3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public function baz() { echo "Worked!"; } } $foo = 'bam'; $bam = ['bar' => new TestClass()]; $$foo['bar']->baz(); // function getResult() { // return "string"; // } //echo getResult(){0};
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7HYnX
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo, !1 = $bam
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'bam'
    9     1        NEW                                              $3      'TestClass'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~5      $3, 'bar'
          4        ASSIGN                                                   !1, ~5
   12     5        FETCH_R                      local               ~7      !0
          6        FETCH_DIM_R                                      ~8      ~7, 'bar'
          7        INIT_METHOD_CALL                                         ~8, 'baz'
          8        DO_FCALL                                      0          
   19     9      > RETURN                                                   1

Class TestClass:
Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7HYnX
function name:  baz
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'Worked%21'
    5     1      > RETURN                                                   null

End of function baz

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.46 ms | 1393 KiB | 13 Q