3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '/product/random?category_id=1'; $pattern = '/regex/'; var_dump(preg_match($str, $pattern, $matches = []));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/q7G3M
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str, !1 = $pattern, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Fproduct%2Frandom%3Fcategory_id%3D1'
    3     1        ASSIGN                                                   !1, '%2Fregex%2F'
    4     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'preg_match'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        ASSIGN                                           ~5      !2, <array>
          7        SEND_VAL_EX                                              ~5
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.19 ms | 1398 KiB | 17 Q