3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait impl { public function dothis() { echo 'trait'; } } class Foo implements Iface { use impl; } interface Iface { public function dothis(); } (new Foo)->dothis();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g8egf
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'foo'
   21     1        NEW                                              $0      'Foo'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'dothis'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function dothis

End of class impl.

Class Foo: [no user functions]
Class Iface:
Function dothis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g8egf
function name:  dothis
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   null

End of function dothis

End of class Iface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.38 ms | 1393 KiB | 13 Q