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 { private $subs = array(); function __construct() { $r = new ReflectionObject(FF_SubTypes); print_r($r->getConstants()); } } $myClass = new MyClass(); //$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/pMT5c
function name:  (null)
number of ops:  5
compiled vars:  !0 = $myClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   DECLARE_CLASS                                            'myclass'
   19     1        NEW                                              $1      'MyClass'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   21     4      > RETURN                                                   1

Class FF_SubTypes: [no user functions]
Class MyClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pMT5c
function name:  __construct
number of ops:  11
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'ReflectionObject'
          1        FETCH_CONSTANT                                   ~2      'FF_SubTypes'
          2        SEND_VAL_EX                                              ~2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   15     5        INIT_FCALL                                               'print_r'
          6        INIT_METHOD_CALL                                         !0, 'getConstants'
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
   16    10      > RETURN                                                   null

End of function __construct

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.64 ms | 1395 KiB | 15 Q