3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface SomeInterface { public function someInterfaceFunction(); } trait SomeTrait { function someInterfaceFunction(){ echo 'Hello'; } } class SomeClass implements SomeInterface { use SomeTrait; } $a = new SomeClass(); $a->someInterfaceFunction();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XY8rr
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'someclass'
   20     1        NEW                                              $1      'SomeClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   22     4        INIT_METHOD_CALL                                         !0, 'someInterfaceFunction'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function someinterfacefunction

End of class SomeInterface.

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

End of function someinterfacefunction

End of class SomeTrait.

Class SomeClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.45 ms | 1394 KiB | 13 Q