3v4l.org

run code in 500+ PHP versions simultaneously
<?php define('constant', 'value'); define('MyClass::constant', 'value'); $constants = get_defined_constants(true); if (isset($constants['user'])) { var_dump($constants['user']); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/erZcK
function name:  (null)
number of ops:  19
compiled vars:  !0 = $constants
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'define'
          1        SEND_VAL                                                     'constant'
          2        SEND_VAL                                                     'value'
          3        DO_ICALL                                                     
    4     4        INIT_FCALL                                                   'define'
          5        SEND_VAL                                                     'MyClass%3A%3Aconstant'
          6        SEND_VAL                                                     'value'
          7        DO_ICALL                                                     
    6     8        INIT_FCALL                                                   'get_defined_constants'
          9        SEND_VAL                                                     <true>
         10        DO_ICALL                                             $3      
         11        ASSIGN                                                       !0, $3
    7    12        ISSET_ISEMPTY_DIM_OBJ                             0          !0, 'user'
         13      > JMPZ                                                         ~5, ->18
    8    14    >   INIT_FCALL                                                   'var_dump'
         15        FETCH_DIM_R                                          ~6      !0, 'user'
         16        SEND_VAL                                                     ~6
         17        DO_ICALL                                                     
    9    18    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.73 ms | 3424 KiB | 16 Q