3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function A() { echo 'direct owner: '.__CLASS__."\n"; echo 'called as part of: '.self::class."\n"; echo 'called by instance of: '.static::class."\n"; } } class B extends A { } class C { function __construct() { B::A(); } } new C();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kbmG1
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $0      'C'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

Class A:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kbmG1
function name:  A
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'direct+owner%3A+A%0A'
    6     1        ECHO                                                     'called+as+part+of%3A+A%0A'
    7     2        FETCH_CLASS_NAME                                 ~0      
          3        CONCAT                                           ~1      'called+by+instance+of%3A+', ~0
          4        CONCAT                                           ~2      ~1, '%0A'
          5        ECHO                                                     ~2
    8     6      > RETURN                                                   null

End of function a

End of class A.

Class B:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kbmG1
function name:  A
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'direct+owner%3A+A%0A'
    6     1        ECHO                                                     'called+as+part+of%3A+A%0A'
    7     2        FETCH_CLASS_NAME                                 ~0      
          3        CONCAT                                           ~1      'called+by+instance+of%3A+', ~0
          4        CONCAT                                           ~2      ~1, '%0A'
          5        ECHO                                                     ~2
    8     6      > RETURN                                                   null

End of function a

End of class B.

Class C:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kbmG1
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'A'
          1        DO_FCALL                                      0          
   16     2      > RETURN                                                   null

End of function __construct

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
261.45 ms | 1395 KiB | 14 Q