3v4l.org

run code in 300+ PHP versions simultaneously
<?php $HTTP_USER_AGENT = "test2asdf"; $seoagents = "test1,test2,test3"; $custom1agents = explode(",",$seoagents); //echo implode('|', $custom1agents); if(preg_match('/('.implode('|', $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 = 19, Position 2 = 21
Branch analysis from position: 19
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: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oDfEg
function name:  (null)
number of ops:  23
compiled vars:  !0 = $HTTP_USER_AGENT, !1 = $seoagents, !2 = $custom1agents, !3 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test2asdf'
    3     1        ASSIGN                                                   !1, 'test1%2Ctest2%2Ctest3'
    4     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2C'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    7     7        INIT_FCALL                                               'preg_match'
          8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '%7C'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $8      
         12        CONCAT                                           ~9      '%2F%28', $8
         13        CONCAT                                           ~10     ~9, '%29%2Fi'
         14        SEND_VAL                                                 ~10
         15        SEND_VAR                                                 !0
         16        SEND_REF                                                 !3
         17        DO_ICALL                                         $11     
         18      > JMPZ                                                     $11, ->21
    9    19    >   ECHO                                                     'matched'
         20      > JMP                                                      ->22
   13    21    >   ECHO                                                     'did+not+match'
   14    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.34 ms | 1395 KiB | 19 Q