3v4l.org

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