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; } function someFunc(SomeInterface $obj) { $obj->someInterfaceFunction(); } someFunc(new SomeClass);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cLYqV
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'someclass'
   24     1        INIT_FCALL                                               'somefunc'
          2        NEW                                              $0      'SomeClass'
          3        DO_FCALL                                      0          
          4        SEND_VAR                                                 $0
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function somefunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cLYqV
function name:  someFunc
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        INIT_METHOD_CALL                                         !0, 'someInterfaceFunction'
          2        DO_FCALL                                      0          
   22     3      > RETURN                                                   null

End of function somefunc

Class SomeInterface:
Function someinterfacefunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cLYqV
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/cLYqV
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:
163.19 ms | 1398 KiB | 14 Q