3v4l.org

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

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

End of function getworld

End of class AbstractWorld.

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

End of function gethello

Function sayhelloworld:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vk26v
function name:  sayHelloWorld
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_METHOD_CALL                                         'getWorld'
          1        DO_FCALL                                      0  $0      
          2        ROPE_INIT                                     4  ~3      $0
          3        ROPE_ADD                                      1  ~3      ~3, '+'
          4        INIT_METHOD_CALL                                         'getHello'
          5        DO_FCALL                                      0  $1      
          6        ROPE_ADD                                      2  ~3      ~3, $1
          7        ROPE_END                                      3  ~2      ~3, '%0A'
          8        ECHO                                                     ~2
   13     9      > RETURN                                                   null

End of function sayhelloworld

End of class Hello.

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

End of function getworld

End of class World.

Class MyHelloWorld: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.92 ms | 1424 KiB | 13 Q