3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait t { function foo() { echo __METHOD__.PHP_EOL; } } class x { use t { foo as goo; foo as ioo; } } (new x)->foo(); // t::foo (new x)->goo(); // t::foo (new x)->ioo(); // t::foo
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Is251
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                                'x'
   16     1        NEW                                                  $0      'x'
          2        DO_FCALL                                          0          
          3        INIT_METHOD_CALL                                             $0, 'foo'
          4        DO_FCALL                                          0          
   17     5        NEW                                                  $3      'x'
          6        DO_FCALL                                          0          
          7        INIT_METHOD_CALL                                             $3, 'goo'
          8        DO_FCALL                                          0          
   18     9        NEW                                                  $6      'x'
         10        DO_FCALL                                          0          
         11        INIT_METHOD_CALL                                             $6, 'ioo'
         12        DO_FCALL                                          0          
         13      > RETURN                                                       1

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

End of function foo

End of class t.

Class x: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.37 ms | 3331 KiB | 13 Q