3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait HelloWorld { public function sayHello() { echo 'Hello '; } public function sayWorld() { echo 'World'; } } class MyHelloWorld { use HelloWorld { sayHello as public; } public function sayExclamationMark() { echo '!'; } } $mhw = new MyHelloWorld(); $mhw->sayHello(); $mhw->sayWorld();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T7Tb0
function name:  (null)
number of ops:  9
compiled vars:  !0 = $mhw
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   DECLARE_CLASS                                                'myhelloworld'
   22     1        NEW                                                  $1      'MyHelloWorld'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   23     4        INIT_METHOD_CALL                                             !0, 'sayHello'
          5        DO_FCALL                                          0          
   24     6        INIT_METHOD_CALL                                             !0, 'sayWorld'
          7        DO_FCALL                                          0          
          8      > RETURN                                                       1

Class HelloWorld:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T7Tb0
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

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

End of function sayworld

End of class HelloWorld.

Class MyHelloWorld:
Function sayexclamationmark:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T7Tb0
function name:  sayExclamationMark
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   18     0  E >   ECHO                                                         '%21'
   19     1      > RETURN                                                       null

End of function sayexclamationmark

End of class MyHelloWorld.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.87 ms | 2085 KiB | 13 Q