3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = "I'm a good boy &@ is it secure var for input to DB."; if(preg_match("/^[a-zA-Z0-9.'&@ ]+$/", $var) !== 1) echo "var is NOT OK.<br/>"; else echo "var is ok.<br/>"; ?>
Output for 4.3.0 - 7.1.0
var is ok.<br/>