3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { public static function b() { echo get_parent_class(self); } } class b extends a { } $b = new b(); $b::b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pfgtj
function name:  (null)
number of ops:  7
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'b'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        FETCH_CLASS                                   0  $4      !0
          4        INIT_STATIC_METHOD_CALL                                  $4, 'b'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class a:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pfgtj
function name:  b
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'get_parent_class'
          1        FETCH_CONSTANT                                   ~0      'self'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4        ECHO                                                     $1
    8     5      > RETURN                                                   null

End of function b

End of class a.

Class b:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pfgtj
function name:  b
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'get_parent_class'
          1        FETCH_CONSTANT                                   ~0      'self'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4        ECHO                                                     $1
    8     5      > RETURN                                                   null

End of function b

End of class b.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.22 ms | 1395 KiB | 15 Q