3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { static function method() { return static function() { return static::class; }; } } class B extends A {} $a = A::method(); $b = B::method(); var_dump($a()); var_dump($b());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVenA
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                      'A', 'method'
          1        DO_FCALL                                          0  $2      
          2        ASSIGN                                                       !0, $2
   13     3        INIT_STATIC_METHOD_CALL                                      'B', 'method'
          4        DO_FCALL                                          0  $4      
          5        ASSIGN                                                       !1, $4
   14     6        INIT_FCALL                                                   'var_dump'
          7        INIT_DYNAMIC_CALL                                            !0
          8        DO_FCALL                                          0  $6      
          9        SEND_VAR                                                     $6
         10        DO_ICALL                                                     
   15    11        INIT_FCALL                                                   'var_dump'
         12        INIT_DYNAMIC_CALL                                            !1
         13        DO_FCALL                                          0  $8      
         14        SEND_VAR                                                     $8
         15        DO_ICALL                                                     
         16      > RETURN                                                       1

Class A:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVenA
function name:  method
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    7     1      > RETURN                                                       ~0
    8     2*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVenA
function name:  {closure:A::method():5}
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   FETCH_CLASS_NAME                                     ~0      
          1      > RETURN                                                       ~0
    7     2*     > RETURN                                                       null

End of Dynamic Function 0

End of function method

End of class A.

Class B:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVenA
function name:  method
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    7     1      > RETURN                                                       ~0
    8     2*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVenA
function name:  {closure:A::method():5}
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   FETCH_CLASS_NAME                                     ~0      
          1      > RETURN                                                       ~0
    7     2*     > RETURN                                                       null

End of Dynamic Function 0

End of function method

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.49 ms | 3288 KiB | 14 Q