3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $kw = " asdsdfsdf \x01 as "; $pattern = '/[[:cntrl:]' . preg_quote(',!@%^*()={};~`<>?\|', '/') . ']/u'; var_dump($pattern); var_dump(var_export($pattern, true)); var_dump(preg_match($pattern, $kw));
based on 7JgSK
Output for 4.3.0 - 7.2.0
string(46) "/[[:cntrl:],\!@%\^\*\(\)\=\{\};~`\<\>\?\\\|]/u" string(62) "'/[[:cntrl:],\\!@%\\^\\*\\(\\)\\=\\{\\};~`\\<\\>\\?\\\\\\|]/u'" int(1)