3v4l.org

run code in 300+ PHP versions simultaneously
<?php //with ^ $str = " {user:fname} and the last name = {user:lname}"; preg_match_all("/^\{(\w):(\w)\}/", $str, $matches); print_r($matches); //without ^ preg_match_all("/\{(\w):(\w)\}/", $str, $matches2); print_r($matches2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D2uC2
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str, !1 = $matches, !2 = $matches2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '+%7Buser%3Afname%7D+and+the+last+name+%3D+%7Buser%3Alname%7D'
    5     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5E%5C%7B%28%5Cw%29%3A%28%5Cw%29%5C%7D%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    9     9        INIT_FCALL                                               'preg_match_all'
         10        SEND_VAL                                                 '%2F%5C%7B%28%5Cw%29%3A%28%5Cw%29%5C%7D%2F'
         11        SEND_VAR                                                 !0
         12        SEND_REF                                                 !2
         13        DO_ICALL                                                 
   10    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.21 ms | 1399 KiB | 17 Q