3v4l.org

run code in 300+ PHP versions simultaneously
<?php $clean_user_agent_test = ' Mozilla/5.0 (Linux; U; Android 4.2; xx-xx; v89_gq2008s Build/JOP40D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30'; if (empty(preg_grep("/(Mac OS)/", explode("\n", $clean_user_agent_test)))){ print('No'); } else{ print('Yes'); }
Finding entry points
Branch analysis from position: 0
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
filename:       /in/t313g
function name:  (null)
number of ops:  15
compiled vars:  !0 = $clean_user_agent_test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '+Mozilla%2F5.0+%28Linux%3B+U%3B+Android+4.2%3B+xx-xx%3B+v89_gq2008s+Build%2FJOP40D%29+AppleWebKit%2F534.30+%28KHTML%2C+like+Gecko%29+Version%2F4.0+Mobile+Safari%2F534.30'
    4     1        INIT_FCALL                                               'preg_grep'
          2        SEND_VAL                                                 '%2F%28Mac+OS%29%2F'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '%0A'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        BOOL_NOT                                         ~4      $3
         10      > JMPZ                                                     ~4, ->13
    5    11    >   ECHO                                                     'No'
         12      > JMP                                                      ->14
    8    13    >   ECHO                                                     'Yes'
    9    14    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.78 ms | 1386 KiB | 17 Q