3v4l.org

run code in 500+ PHP versions simultaneously
<?php #echo define('\dev\null\null2', 1); define('null2', 23); define('\null2', 45); print_r(get_defined_constants()['\\null2']); print ' '; print_r(get_defined_constants()['\null2']); print ' '; print_r(get_defined_constants()['null2']); print '-'; echo null2; print ' '; echo \null2; print '-'; print_r(constant('\\null2')); print ' '; print_r(constant('\null2')); print ' '; print_r(constant('null2')); print ' ';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JjRp6
function name:  (null)
number of ops:  57
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'define'
          1        SEND_VAL                                                     'null2'
          2        SEND_VAL                                                     23
          3        DO_ICALL                                                     
    5     4        INIT_FCALL                                                   'define'
          5        SEND_VAL                                                     '%5Cnull2'
          6        SEND_VAL                                                     45
          7        DO_ICALL                                                     
    7     8        INIT_FCALL                                                   'print_r'
          9        INIT_FCALL                                                   'get_defined_constants'
         10        DO_ICALL                                             $2      
         11        FETCH_DIM_R                                          ~3      $2, '%5Cnull2'
         12        SEND_VAL                                                     ~3
         13        DO_ICALL                                                     
    8    14        ECHO                                                         '+'
    9    15        INIT_FCALL                                                   'print_r'
         16        INIT_FCALL                                                   'get_defined_constants'
         17        DO_ICALL                                             $5      
         18        FETCH_DIM_R                                          ~6      $5, '%5Cnull2'
         19        SEND_VAL                                                     ~6
         20        DO_ICALL                                                     
   10    21        ECHO                                                         '+'
   11    22        INIT_FCALL                                                   'print_r'
         23        INIT_FCALL                                                   'get_defined_constants'
         24        DO_ICALL                                             $8      
         25        FETCH_DIM_R                                          ~9      $8, 'null2'
         26        SEND_VAL                                                     ~9
         27        DO_ICALL                                                     
   12    28        ECHO                                                         '-'
   14    29        FETCH_CONSTANT                                       ~11     'null2'
         30        ECHO                                                         ~11
   15    31        ECHO                                                         '+'
   16    32        FETCH_CONSTANT                                       ~12     'null2'
         33        ECHO                                                         ~12
   17    34        ECHO                                                         '-'
   19    35        INIT_FCALL                                                   'print_r'
         36        INIT_FCALL                                                   'constant'
         37        SEND_VAL                                                     '%5Cnull2'
         38        DO_ICALL                                             $13     
         39        SEND_VAR                                                     $13
         40        DO_ICALL                                                     
   20    41        ECHO                                                         '+'
   21    42        INIT_FCALL                                                   'print_r'
         43        INIT_FCALL                                                   'constant'
         44        SEND_VAL                                                     '%5Cnull2'
         45        DO_ICALL                                             $15     
         46        SEND_VAR                                                     $15
         47        DO_ICALL                                                     
   22    48        ECHO                                                         '+'
   23    49        INIT_FCALL                                                   'print_r'
         50        INIT_FCALL                                                   'constant'
         51        SEND_VAL                                                     'null2'
         52        DO_ICALL                                             $17     
         53        SEND_VAR                                                     $17
         54        DO_ICALL                                                     
   24    55        ECHO                                                         '+'
         56      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
177.34 ms | 494 KiB | 13 Q