3v4l.org

run code in 300+ PHP versions simultaneously
<?php $HTTP_USER_AGENT = "afeaetest2asdf"; $INSTALLED_STYLES = array("desktop","mobile","topifySeo"); $seo_agents = "test1,test2,test3"; $custom1agents = str_replace(",","|",$seo_agents);//explode(",",$seo_agents); //echo $custom1agents; if(preg_match('/('.$custom1agents.')/i', $HTTP_USER_AGENT, $match)) { echo "matched"; } else { echo "did not match"; }
Finding entry points
Branch analysis from position: 0
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 = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hjbKM
function name:  (null)
number of ops:  21
compiled vars:  !0 = $HTTP_USER_AGENT, !1 = $INSTALLED_STYLES, !2 = $seo_agents, !3 = $custom1agents, !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, 'test1%2Ctest2%2Ctest3'
    5     3        INIT_FCALL                                               'str_replace'
          4        SEND_VAL                                                 '%2C'
          5        SEND_VAL                                                 '%7C'
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !3, $8
    8     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
   10    17    >   ECHO                                                     'matched'
         18      > JMP                                                      ->20
   14    19    >   ECHO                                                     'did+not+match'
   15    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.74 ms | 1395 KiB | 17 Q