3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Hello { public function sayHelloWorld() { echo 'Hello'.$this->getWorld(); } abstract public function getWorld(); } class MyHelloWorld { use Hello; public function getWorld() { return 'world'; } } echo (new MyHelloWorld())->sayHelloWorld();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z3qgM
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'myhelloworld'
   17     1        NEW                                              $0      'MyHelloWorld'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'sayHelloWorld'
          4        DO_FCALL                                      0  $2      
          5        ECHO                                                     $2
          6      > RETURN                                                   1

Class Hello:
Function sayhelloworld:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z3qgM
function name:  sayHelloWorld
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_METHOD_CALL                                         'getWorld'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'Hello', $0
          3        ECHO                                                     ~1
    6     4      > RETURN                                                   null

End of function sayhelloworld

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

End of function getworld

End of class Hello.

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

End of function getworld

End of class MyHelloWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.73 ms | 1394 KiB | 13 Q