3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(preg_match('/MSIE (.*?);/', "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" ) || preg_match('/^(?=.*(Trident))(?=.*(rv:11.0)).*$/', "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko" )) { $url = 'IE detected'; } else { $url = 'not detected'; } echo $url;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/MnsDC
function name:  (null)
number of ops:  16
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'
    3     2        SEND_VAL                                                 'Mozilla%2F5.0+%28Windows+NT+6.1%3B+WOW64%3B+Trident%2F7.0%3B+rv%3A11.0%29+like+Gecko'
          3        DO_ICALL                                         $1      
          4      > JMPNZ_EX                                         ~2      $1, ->10
    6     5    >   INIT_FCALL                                               'preg_match'
          6        SEND_VAL                                                 '%2F%5E%28%3F%3D.%2A%28Trident%29%29%28%3F%3D.%2A%28rv%3A11.0%29%29.%2A%24%2F'
    7     7        SEND_VAL                                                 'Mozilla%2F5.0+%28Windows+NT+6.1%3B+WOW64%3B+Trident%2F7.0%3B+rv%3A11.0%29+like+Gecko'
          8        DO_ICALL                                         $3      
          9        BOOL                                             ~2      $3
         10    > > JMPZ                                                     ~2, ->13
   10    11    >   ASSIGN                                                   !0, 'IE+detected'
         12      > JMP                                                      ->14
   12    13    >   ASSIGN                                                   !0, 'not+detected'
   15    14    >   ECHO                                                     !0
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.49 ms | 1395 KiB | 15 Q