3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface MyInterface { public function execute(\stdClass $arg1 = null, $arg2 = null); } trait MyTrait { public function execute(\Exception $e = null) { echo 'Not this'; } } class MyClass implements MyInterface { use MyTrait { execute as protected commanderExecute; } public function execute(\stdClass $arg1 = null, $arg2 = null) { echo 'Hello'; } } (new MyClass)->execute();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K86Bt
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'myclass'
   29     1        NEW                                              $0      'MyClass'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'execute'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class MyInterface:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K86Bt
function name:  execute
number of ops:  3
compiled vars:  !0 = $arg1, !1 = $arg2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
          2      > RETURN                                                   null

End of function execute

End of class MyInterface.

Class MyTrait:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K86Bt
function name:  execute
number of ops:  3
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV_INIT                                        !0      null
   10     1        ECHO                                                     'Not+this'
   11     2      > RETURN                                                   null

End of function execute

End of class MyTrait.

Class MyClass:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K86Bt
function name:  execute
number of ops:  4
compiled vars:  !0 = $arg1, !1 = $arg2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
   23     2        ECHO                                                     'Hello'
   24     3      > RETURN                                                   null

End of function execute

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.89 ms | 1394 KiB | 13 Q