3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface FF_SubTypes { const FF = "FlixFling"; const GH = "Grindhouse"; const FR = "FrightFlix"; const KF = "KidsFlix"; const SD = "ScreenDreams"; } class MyClass implements FF_SubTypes { public $subs = array(); function __construct() { $r = new ReflectionObject($this); print_r($r->getConstants()); foreach($r AS $sub_name) { $subs[] = $sub_name; } } } $myClass = new MyClass(); print_r($myClass->subs); //$reflected = new ReflectionObject($myClass); //print_r($reflected->getConstants());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o0LsK
function name:  (null)
number of ops:  9
compiled vars:  !0 = $myClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'myclass'
   20     1        NEW                                              $1      'MyClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   21     4        INIT_FCALL                                               'print_r'
          5        FETCH_OBJ_R                                      ~4      !0, 'subs'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   23     8      > RETURN                                                   1

Class FF_SubTypes: [no user functions]
Class MyClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/o0LsK
function name:  __construct
number of ops:  17
compiled vars:  !0 = $r, !1 = $sub_name, !2 = $subs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'ReflectionObject'
          1        FETCH_THIS                                       $4      
          2        SEND_VAR_EX                                              $4
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $3
   15     5        INIT_FCALL                                               'print_r'
          6        INIT_METHOD_CALL                                         !0, 'getConstants'
          7        DO_FCALL                                      0  $7      
          8        SEND_VAR                                                 $7
          9        DO_ICALL                                                 
   16    10      > FE_RESET_R                                       $9      !0, ->15
         11    > > FE_FETCH_R                                               $9, !1, ->15
         12    >   ASSIGN_DIM                                               !2
         13        OP_DATA                                                  !1
         14      > JMP                                                      ->11
         15    >   FE_FREE                                                  $9
   17    16      > RETURN                                                   null

End of function __construct

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.52 ms | 1396 KiB | 15 Q