3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { function foo() { echo "yay"; } } $obj = new test(); $callback = array($obj, 'foo'); $callback(); echo "end";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mgmrn
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj, !1 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        INIT_ARRAY                                       ~5      !0
          4        ADD_ARRAY_ELEMENT                                ~5      'foo'
          5        ASSIGN                                                   !1, ~5
   12     6        INIT_DYNAMIC_CALL                                        !1
          7        DO_FCALL                                      0          
   14     8        ECHO                                                     'end'
          9      > RETURN                                                   1

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

End of function foo

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.24 ms | 1393 KiB | 13 Q