3v4l.org

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

End of function fetch_style_title_options_array

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.22 ms | 1399 KiB | 19 Q