3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arrayOfString = array( 'customer service[-3] technical support[-3]', 'picture quality[+2]feature[+2]', 'smell[-2]', 'player[+2]', 'player[-3][u]', 'dvd player[-2]', 'player[+2][p]', 'format[+2][u]progressive scan[-2]' ); preg_match_all("/([\w ]+[^[]]*)\[([+-]\d*?)\]/", implode("," $arrayOfString), $matches); print_r($matches);
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected '$arrayOfString' (T_VARIABLE) in /in/6ZhOg on line 13
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/6ZhOg on line 13
Process exited with code 255.