3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace My; interface Face { const EYES = 'eyes'; } var_dump((new \ReflectionClass(Face::class))->getConstants()); var_dump((new \ReflectionClass(Face::class->getConstants())));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kk5kg
function name:  (null)
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_NS_FCALL_BY_NAME                                    'My%5Cvar_dump'
          1        NEW                                              $0      'ReflectionClass'
          2        SEND_VAL_EX                                              'My%5CFace'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'getConstants'
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR_NO_REF_EX                                       $2
          7        DO_FCALL                                      0          
   12     8        INIT_NS_FCALL_BY_NAME                                    'My%5Cvar_dump'
          9        NEW                                              $4      'ReflectionClass'
         10        INIT_METHOD_CALL                                         'My%5CFace', 'getConstants'
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR_NO_REF_EX                                       $5
         13        DO_FCALL                                      0          
         14        SEND_VAR_NO_REF_EX                                       $4
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Class My\Face: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.14 ms | 1394 KiB | 15 Q