3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a="[a-zA-Z0-9.-_~!$&'()*+,;=:@]"; echo $a; echo PHP_EOL; echo preg_quote($a);
Output for 5.3.0 - 7.1.0
[a-zA-Z0-9.-_~!$&'()*+,;=:@] \[a\-zA\-Z0\-9\.\-_~\!\$&'\(\)\*\+,;\=\:@\]
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.2.17
[a-zA-Z0-9.-_~!$&'()*+,;=:@] \[a-zA-Z0-9\.-_~\!\$&'\(\)\*\+,;\=\:@\]
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
[a-zA-Z0-9.-_~!$&'()*+,;=:@] Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/a9cpJ on line 5 PHP_EOL\[a-zA-Z0-9\.-_~\!\$&'\(\)\*\+,;\=\:@\]