3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT']) || // This regex fails to detect IE 11 preg_match('/^(?=.*(Trident))(?=.*(rv:11.0)).*$/', $_SERVER['HTTP_USER_AGENT'])) // This regex recognizes IE 11 by matching the keywords "Trident" and "rv:11.0" { $url = 'IE detected'; } else { $url = 'not detected'; } echo $url;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/YuLpJ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%2FMSIE+%28.%2A%3F%29%3B%2F'
          2        FETCH_R                      global              ~1      '_SERVER'
          3        FETCH_DIM_R                                      ~2      ~1, 'HTTP_USER_AGENT'
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                         $3      
          6      > JMPNZ_EX                                         ~4      $3, ->14
    3     7    >   INIT_FCALL                                               'preg_match'
          8        SEND_VAL                                                 '%2F%5E%28%3F%3D.%2A%28Trident%29%29%28%3F%3D.%2A%28rv%3A11.0%29%29.%2A%24%2F'
          9        FETCH_R                      global              ~5      '_SERVER'
         10        FETCH_DIM_R                                      ~6      ~5, 'HTTP_USER_AGENT'
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        BOOL                                             ~4      $7
         14    > > JMPZ                                                     ~4, ->17
    5    15    >   ASSIGN                                                   !0, 'IE+detected'
         16      > JMP                                                      ->18
    7    17    >   ASSIGN                                                   !0, 'not+detected'
   10    18    >   ECHO                                                     !0
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.75 ms | 1395 KiB | 15 Q