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"); 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 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8nhJq
function name:  (null)
number of ops:  18
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        INIT_FCALL                                               'in_array'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6      > JMPZ                                                     $5, ->9
    5     7    >   ECHO                                                     'using+something+else'
          8      > JMP                                                      ->17
    7     9    >   INIT_FCALL                                               'in_array'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13      > JMPZ                                                     $6, ->16
    8    14    >   ECHO                                                     'uysing+a+shitty+browser'
         15      > JMP                                                      ->17
   11    16    >   ECHO                                                     'fail'
   12    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.37 ms | 1386 KiB | 15 Q