3v4l.org

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

Function fetch_style_title_options_array:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rjItZ
function name:  fetch_style_title_options_array
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   <array>
    6     1*     > RETURN                                                   null

End of function fetch_style_title_options_array

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.4 ms | 1398 KiB | 18 Q