3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "infoscom.ipad"; $pattern = '/(' . str_replace('.', '\.', $key) . '\.\w+);/i'; $ua = "Mozilla/5.0 (infoscom.iPad.1; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10"; var_dump(preg_match($pattern, $ua, $reMatches), $reMatches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QflVP
function name:  (null)
number of ops:  20
compiled vars:  !0 = $key, !1 = $pattern, !2 = $ua, !3 = $reMatches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'infoscom.ipad'
    3     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '.'
          3        SEND_VAL                                                 '%5C.'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        CONCAT                                           ~6      '%2F%28', $5
          7        CONCAT                                           ~7      ~6, '%5C.%5Cw%2B%29%3B%2Fi'
          8        ASSIGN                                                   !1, ~7
    4     9        ASSIGN                                                   !2, 'Mozilla%2F5.0+%28infoscom.iPad.1%3B+U%3B+CPU+OS+3_2+like+Mac+OS+X%3B+en-us%29+AppleWebKit%2F531.21.10+%28KHTML%2C+like+Gecko%29+Version%2F4.0.4+Mobile%2F7B334b+Safari%2F531.21.10'
    6    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'preg_match'
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !2
         14        SEND_REF                                                 !3
         15        DO_ICALL                                         $10     
         16        SEND_VAR                                                 $10
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.34 ms | 1395 KiB | 19 Q