3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T{ public function kk() { echo 'kk'; } } trait T2{ public function kk() { echo 'T2'; } } class World { use T, T2 { T::kk as xx; T2::kk insteadof T; } protected static function hello() { echo "Hello " . __CLASS__; } } $w = new World; $w->xx();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BhGTO
function name:  (null)
number of ops:  7
compiled vars:  !0 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   DECLARE_CLASS                                            'world'
   27     1        NEW                                              $1      'World'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   28     4        INIT_METHOD_CALL                                         !0, 'xx'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

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

End of function kk

End of class T.

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

End of function kk

End of class T2.

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

End of function hello

End of class World.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.15 ms | 1394 KiB | 13 Q