3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait impl { public function dothis() { echo 'trait'; } } abstract class Abs implements Iface { abstract function dothis(); } class Foo extends Abs { use impl; public function dothis() { echo 'class'; } } 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/gH3Ip
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_CLASS                                            'abs'
   16     1        DECLARE_CLASS                                            'foo', 'abs'
   31     2        NEW                                              $0      'Foo'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'dothis'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class impl:
Function dothis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gH3Ip
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 Abs:
Function dothis:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gH3Ip
function name:  dothis
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   null

End of function dothis

End of class Abs.

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

End of function dothis

End of class Foo.

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

End of function dothis

End of class Iface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.18 ms | 1395 KiB | 13 Q