3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $frequentlyWritten = array( 'option_name: akismet_spam_count', 'option_name:request_counter', '-option_name:request_counter', "option_name:'request_counter'", 'option_name:"request_counter", ); // https://regex101.com/r/wT6zG3/2 (query language) $re = "/(-)?(?:(\\S+):\\s*)?(?:'((?:[^'\\\\]|\\\\.)*)'|\"((?:[^\"\\\\]|\\\\.)*)\"|(\\S+))/"; foreach ($frequentlyWritten as $rule) { preg_match_all($re, $rule, $matches); print_r($matches); }
based on cAfmR
Output for 7.0.0 - 7.0.2
Parse error: syntax error, unexpected '?' in /in/8gH3C on line 12
Process exited with code 255.
Output for 5.3.21 - 5.6.17
Parse error: syntax error, unexpected '(', expecting ')' in /in/8gH3C on line 12
Process exited with code 255.