3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $str = "(联想 OR 戴尔 OR 苹果 OR 宏基) dangers:deep1条 dangers:(newuuid deep1条 FirstTimeImageRule) 价格_i:[1500 TO 2500] cityEnglishName:beijing categoryEnglishName:bijiben"; preg_match_all('/(([a-zA-Z]+)\s*\:\s*\(([^\)]+)\))?/', $str, $m); var_dump($m['key'], $m['lval']);
Output for 5.3.0 - 7.1.0
Notice: Undefined index: key in /in/PhMiM on line 5 Notice: Undefined index: lval in /in/PhMiM on line 5 NULL NULL
Output for 4.3.0 - 5.2.17
Notice: Undefined index: key in /in/PhMiM on line 5 Notice: Undefined index: lval in /in/PhMiM on line 5 NULL NULL