3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { static function call() { self::method(); $self = self::class; $self::method(); } static function method() { echo static::class; } } class B extends A {} B::call();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NSdB8
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'call'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class A:
Function call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NSdB8
function name:  call
number of ops:  7
compiled vars:  !0 = $self
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_STATIC_METHOD_CALL                                  'method'
          1        DO_FCALL                                      0          
    7     2        ASSIGN                                                   !0, 'A'
    8     3        FETCH_CLASS                                   0  $3      !0
          4        INIT_STATIC_METHOD_CALL                                  $3, 'method'
          5        DO_FCALL                                      0          
    9     6      > RETURN                                                   null

End of function call

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

End of function method

End of class A.

Class B:
Function call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NSdB8
function name:  call
number of ops:  7
compiled vars:  !0 = $self
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_STATIC_METHOD_CALL                                  'method'
          1        DO_FCALL                                      0          
    7     2        ASSIGN                                                   !0, 'A'
    8     3        FETCH_CLASS                                   0  $3      !0
          4        INIT_STATIC_METHOD_CALL                                  $3, 'method'
          5        DO_FCALL                                      0          
    9     6      > RETURN                                                   null

End of function call

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

End of function method

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.02 ms | 1395 KiB | 13 Q