3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "(联想 OR 戴尔 OR 苹果 OR 宏基) dangers:deep1条 dangers:(newuuid deep1条 FirstTimeImageRule) 价格_i:[1500 TO 2500] cityEnglishName:beijing categoryEnglishName:bijiben"; var_dump(preg_match_all('/((?<key>[^\:\(\)]+)\s*\:\s*\((?<lval>[^\(\)]+)\))?/', $str, $m)); var_dump($m['key'], $m['lval']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Zg6fY
function name:  (null)
number of ops:  16
compiled vars:  !0 = $str, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%28%E8%81%94%E6%83%B3+OR+%E6%88%B4%E5%B0%94+OR+%E8%8B%B9%E6%9E%9C+OR+%E5%AE%8F%E5%9F%BA%29+dangers%3Adeep1%E6%9D%A1+dangers%3A%28newuuid+deep1%E6%9D%A1+FirstTimeImageRule%29+%E4%BB%B7%E6%A0%BC_i%3A%5B1500+TO+2500%5D+cityEnglishName%3Abeijing+categoryEnglishName%3Abijiben'
    4     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%28%28%3F%3Ckey%3E%5B%5E%5C%3A%5C%28%5C%29%5D%2B%29%5Cs%2A%5C%3A%5Cs%2A%5C%28%28%3F%3Clval%3E%5B%5E%5C%28%5C%29%5D%2B%29%5C%29%29%3F%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        DO_ICALL                                                 
    5     9        INIT_FCALL                                               'var_dump'
         10        FETCH_DIM_R                                      ~5      !1, 'key'
         11        SEND_VAL                                                 ~5
         12        FETCH_DIM_R                                      ~6      !1, 'lval'
         13        SEND_VAL                                                 ~6
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.52 ms | 1395 KiB | 17 Q