3v4l.org

run code in 300+ PHP versions simultaneously
<?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); }
Output for 5.5.24 - 5.5.31, 5.6.8 - 5.6.17, 7.0.0 - 7.0.2
Parse error: syntax error, unexpected 'request_counter' (T_STRING), expecting ')' in /in/cAfmR on line 7
Process exited with code 255.

preferences:
169.84 ms | 1395 KiB | 28 Q