3v4l.org

run code in 300+ PHP versions simultaneously
<?php //because Safari wont play ball $allowedBrowsers = array("Chrome", "Firefox"); $browser = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"; if (strpos($browser, $allowedBrowsers) !== FALSE) { echo "no safari"; } else { echo "using safari"; } //$browser = get_browser(null, true); //print_r($browser); ?>
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 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/da3gd
function name:  (null)
number of ops:  12
compiled vars:  !0 = $allowedBrowsers, !1 = $browser
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, 'Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_9_3%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F35.0.1916.153+Safari%2F537.36'
    4     2        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        TYPE_CHECK                                  1018          $4
          7      > JMPZ                                                     ~5, ->10
    5     8    >   ECHO                                                     'no+safari'
          9      > JMP                                                      ->11
    8    10    >   ECHO                                                     'using+safari'
   13    11    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
303.2 ms | 1399 KiB | 16 Q