3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function sayHello() { echo 'Hello '; } } trait SayWorld { abstract public function sayHello(); } class MyHelloWorld extends Base { use SayWorld; public function sayHello() { parent::sayHello(); echo ' World!'; } } $o = new MyHelloWorld(); $o->sayHello(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NcANb
function name:  (null)
number of ops:  7
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                            'myhelloworld', 'base'
   20     1        NEW                                              $1      'MyHelloWorld'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   21     4        INIT_METHOD_CALL                                         !0, 'sayHello'
          5        DO_FCALL                                      0          
   22     6      > RETURN                                                   1

Class Base:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NcANb
function name:  sayHello
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'Hello+'
    5     1      > RETURN                                                   null

End of function sayhello

End of class Base.

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

End of function sayhello

End of class SayWorld.

Class MyHelloWorld:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NcANb
function name:  sayHello
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'sayHello'
          1        DO_FCALL                                      0          
   16     2        ECHO                                                     '+World%21'
   17     3      > RETURN                                                   null

End of function sayhello

End of class MyHelloWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.37 ms | 1394 KiB | 13 Q