3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (strpos($_SERVER['HTTP_HOST'],"test.mijndomein.nl") > 0) { $redirect = "test.php"; } elseif (strpos($_SERVER['HTTP_HOST'],"www.mijndomein.nl") > 0) { $redirect = "index.php"; } elseif (strpos($_SERVER['HTTP_HOST'],"beheer.mijndomein.nl") > 0) { $redirect = "beheer.php"; } else { $redirect = "index.php"; } header("Location: ".$redirect ); exit(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 30
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/5Io9l
function name:  (null)
number of ops:  37
compiled vars:  !0 = $redirect
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'strpos'
          1        FETCH_R                      global              ~1      '_SERVER'
          2        FETCH_DIM_R                                      ~2      ~1, 'HTTP_HOST'
          3        SEND_VAL                                                 ~2
          4        SEND_VAL                                                 'test.mijndomein.nl'
          5        DO_ICALL                                         $3      
          6        IS_SMALLER                                               0, $3
          7      > JMPZ                                                     ~4, ->10
    3     8    >   ASSIGN                                                   !0, 'test.php'
          9      > JMP                                                      ->31
    4    10    >   INIT_FCALL                                               'strpos'
         11        FETCH_R                      global              ~6      '_SERVER'
         12        FETCH_DIM_R                                      ~7      ~6, 'HTTP_HOST'
         13        SEND_VAL                                                 ~7
         14        SEND_VAL                                                 'www.mijndomein.nl'
         15        DO_ICALL                                         $8      
         16        IS_SMALLER                                               0, $8
         17      > JMPZ                                                     ~9, ->20
    5    18    >   ASSIGN                                                   !0, 'index.php'
         19      > JMP                                                      ->31
    6    20    >   INIT_FCALL                                               'strpos'
         21        FETCH_R                      global              ~11     '_SERVER'
         22        FETCH_DIM_R                                      ~12     ~11, 'HTTP_HOST'
         23        SEND_VAL                                                 ~12
         24        SEND_VAL                                                 'beheer.mijndomein.nl'
         25        DO_ICALL                                         $13     
         26        IS_SMALLER                                               0, $13
         27      > JMPZ                                                     ~14, ->30
    7    28    >   ASSIGN                                                   !0, 'beheer.php'
         29      > JMP                                                      ->31
    9    30    >   ASSIGN                                                   !0, 'index.php'
   12    31    >   INIT_FCALL                                               'header'
         32        CONCAT                                           ~17     'Location%3A+', !0
         33        SEND_VAL                                                 ~17
         34        DO_ICALL                                                 
   13    35      > EXIT                                                     
   14    36*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.06 ms | 1400 KiB | 17 Q