3v4l.org

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

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

End of function a

End of class A.

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.67 ms | 944 KiB | 14 Q