3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait B { private function a() { print "B"; } public function b() { self::a(); } } class A { use B; } (new A)->b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aWWVJ
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'a'
   12     1        NEW                                              $0      'A'
          2        DO_FCALL                                      0          
          3        INIT_METHOD_CALL                                         $0, 'b'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function a

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

End of function b

End of class B.

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.69 ms | 1385 KiB | 13 Q