3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $kw = " asdsdfsdf \n as "; $pattern = '/^((?![[:cntrl:]' . preg_quote(',!@%^*()={};~`<>?\|', '/') . ']).)*$/u'; var_dump($pattern); var_export($pattern); echo PHP_EOL; var_dump(preg_match($pattern, $kw));
based on SI70X
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.2.0
string(56) "/^((?![[:cntrl:],\!@%\^\*\(\)\=\{\};~`\<\>\?\\\|]).)*$/u" '/^((?![[:cntrl:],\\!@%\\^\\*\\(\\)\\=\\{\\};~`\\<\\>\\?\\\\\\|]).)*$/u' int(0)
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
string(56) "/^((?![[:cntrl:],\!@%\^\*\(\)\=\{\};~`\<\>\?\\\|]).)*$/u" '/^((?![[:cntrl:],\\!@%\\^\\*\\(\\)\\=\\{\\};~`\\<\\>\\?\\\\\\|]).)*$/u' Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/mAgu2 on line 7 PHP_EOLint(0)