3v4l.org

run code in 300+ PHP versions simultaneously
<?php const DIR_PATH_LINUX = '/opt/myprogram/'; const DIR_PATH_WINDOWS = 'C:\xampp\htdocs\\parspack\\storage\\myprogram\\'; $os = 'windows'; echo constant("DIR_PATH_".strtoupper($os));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3GPjn
function name:  (null)
number of ops:  12
compiled vars:  !0 = $os
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CONST                                            'DIR_PATH_LINUX', '%2Fopt%2Fmyprogram%2F'
    3     1        DECLARE_CONST                                            'DIR_PATH_WINDOWS', 'C%3A%5Cxampp%5Chtdocs%5Cparspack%5Cstorage%5Cmyprogram%5C'
    5     2        ASSIGN                                                   !0, 'windows'
    7     3        INIT_FCALL                                               'constant'
          4        INIT_FCALL                                               'strtoupper'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        CONCAT                                           ~3      'DIR_PATH_', $2
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $4      
         10        ECHO                                                     $4
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.82 ms | 1398 KiB | 17 Q