3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"; $search = "Chr"; Preg_match("/". $search . ".*?\/\d+\.\d+\.\d+\.\d+/", $str, $match); Var_dump($match);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uYpoP
function name:  (null)
number of ops:  13
compiled vars:  !0 = $str, !1 = $search, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F60.0.3112.90+Safari%2F537.36'
    5     1        ASSIGN                                                   !1, 'Chr'
    6     2        INIT_FCALL                                               'preg_match'
          3        CONCAT                                           ~5      '%2F', !1
          4        CONCAT                                           ~6      ~5, '.%2A%3F%5C%2F%5Cd%2B%5C.%5Cd%2B%5C.%5Cd%2B%5C.%5Cd%2B%2F'
          5        SEND_VAL                                                 ~6
          6        SEND_VAR                                                 !0
          7        SEND_REF                                                 !2
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.75 ms | 1010 KiB | 15 Q