3v4l.org

run code in 300+ PHP versions simultaneously
<?php $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"; $allowedBrowsers = array("Chrome", "Firefox"); $badBrowsers = array("Safari"); if (in_array($allowedBrowsers, $browser)) { echo "using something else"; } elseif (in_array($badBrowsers, $browser)) { echo "uysing a shitty browser"; } else { echo "fail"; }
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 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
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
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CeCB7
function name:  (null)
number of ops:  19
compiled vars:  !0 = $browser, !1 = $allowedBrowsers, !2 = $badBrowsers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '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'
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        INIT_FCALL                                               'in_array'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $6      
          7      > JMPZ                                                     $6, ->10
    6     8    >   ECHO                                                     'using+something+else'
          9      > JMP                                                      ->18
    8    10    >   INIT_FCALL                                               'in_array'
         11        SEND_VAR                                                 !2
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $7      
         14      > JMPZ                                                     $7, ->17
    9    15    >   ECHO                                                     'uysing+a+shitty+browser'
         16      > JMP                                                      ->18
   12    17    >   ECHO                                                     'fail'
   13    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.97 ms | 1387 KiB | 15 Q