3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { static function className(); } class A implements I { static function className() { echo "A"; } } class B implements I { static function className() { echo "B"; } } $a = new A(); $b = new B(); $a::className(); $b::className(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9G84A
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'a'
   13     1        DECLARE_CLASS                                            'b'
   21     2        NEW                                              $2      'A'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   22     5        NEW                                              $5      'B'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   24     8        FETCH_CLASS                                   0  $8      !0
          9        INIT_STATIC_METHOD_CALL                                  $8, 'className'
         10        DO_FCALL                                      0          
   25    11        FETCH_CLASS                                   0  $10     !1
         12        INIT_STATIC_METHOD_CALL                                  $10, 'className'
         13        DO_FCALL                                      0          
   26    14      > RETURN                                                   1

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

End of function classname

End of class I.

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

End of function classname

End of class A.

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

End of function classname

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.42 ms | 1395 KiB | 13 Q