3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait foo { public function hello() { print 123; } } class a { use foo; } class b extends a { use foo; } $b = new b(); $b->hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UYgcq
function name:  (null)
number of ops:  8
compiled vars:  !0 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                                'a'
   13     1        DECLARE_CLASS                                                'b', 'a'
   17     2        NEW                                                  $1      'b'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   18     5        INIT_METHOD_CALL                                             !0, 'hello'
          6        DO_FCALL                                          0          
          7      > RETURN                                                       1

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

End of function hello

End of class foo.

Class a: [no user functions]
Class b: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.45 ms | 2207 KiB | 13 Q