3v4l.org

run code in 300+ PHP versions simultaneously
<?php $HTTP_USER_AGENT = "afeaeTest2asdf"; //$_SERVER['HTTP_USER_AGENT'] $INSTALLED_STYLES = array("desktop","mobile",""); //fetch_style_title_options_array() $TOPIFY_SEO_STYLE = "topifySeo"; //whatever we name our seo skin $seo_agents = "Googlebot|test2|test3"; //$custom1agents = str_replace(",","|",$seo_agents);//explode(",",$seo_agents); if(in_array($TOPIFY_SEO_STYLE, $INSTALLED_STYLES)) { if(preg_match('/('.$seo_agents.')/i', $HTTP_USER_AGENT, $match)) { echo "matched"; } else { echo "did not match"; } } else { echo "topify seo not installed"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 21
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/avBt8
function name:  (null)
number of ops:  23
compiled vars:  !0 = $HTTP_USER_AGENT, !1 = $INSTALLED_STYLES, !2 = $TOPIFY_SEO_STYLE, !3 = $seo_agents, !4 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'afeaeTest2asdf'
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, 'topifySeo'
    7     3        ASSIGN                                                   !3, 'Googlebot%7Ctest2%7Ctest3'
   10     4        INIT_FCALL                                               'in_array'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $9      
          8      > JMPZ                                                     $9, ->21
   12     9    >   INIT_FCALL                                               'preg_match'
         10        CONCAT                                           ~10     '%2F%28', !3
         11        CONCAT                                           ~11     ~10, '%29%2Fi'
         12        SEND_VAL                                                 ~11
         13        SEND_VAR                                                 !0
         14        SEND_REF                                                 !4
         15        DO_ICALL                                         $12     
         16      > JMPZ                                                     $12, ->19
   14    17    >   ECHO                                                     'matched'
         18      > JMP                                                      ->20
   18    19    >   ECHO                                                     'did+not+match'
         20    > > JMP                                                      ->22
   23    21    >   ECHO                                                     'topify+seo+not+installed'
   24    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.94 ms | 1387 KiB | 17 Q