3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public static function c() { return 'hey'; } } $x = new stdClass; $x->c = new C; var_dump($x->c::c());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CrvOo
function name:  (null)
number of ops:  15
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        NEW                                              $5      'C'
          4        DO_FCALL                                      0          
          5        ASSIGN_OBJ                                               !0, 'c'
          6        OP_DATA                                                  $5
   12     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~7      !0, 'c'
          9        FETCH_CLASS                                   0  $8      ~7
         10        INIT_STATIC_METHOD_CALL                                  $8, 'c'
         11        DO_FCALL                                      0  $9      
         12        SEND_VAR                                                 $9
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function c

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.53 ms | 1395 KiB | 15 Q