3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public function sayHello() { echo 'Hello '; } } trait SayWorld { public function sayHello() { echo 'World!'; parent::sayHello(); } } class MyHelloWorld extends Base { use SayWorld; } $o = new MyHelloWorld(); $o->sayHello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MiCb6
function name:  (null)
number of ops:  7
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     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          
          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/MiCb6
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/MiCb6
function name:  sayHello
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'World%21'
   12     1        INIT_STATIC_METHOD_CALL                                  'sayHello'
          2        DO_FCALL                                      0          
   13     3      > RETURN                                                   null

End of function sayhello

End of class SayWorld.

Class MyHelloWorld: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.51 ms | 1393 KiB | 13 Q