3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { const V = 'foo'; } class C implements I { public function f() { return static::V; } } var_dump((new C)->f());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z616Z
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'c'
   11     1        INIT_FCALL                                               'var_dump'
          2        NEW                                              $0      'C'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'f'
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class I: [no user functions]
Class C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z616Z
function name:  f
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_CLASS_CONSTANT                             ~0      'V'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function f

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.49 ms | 996 KiB | 14 Q