3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $usernameCheck = 'dani'; function checkUsername($username) { return (bool)!preg_match('/[^a-z_\-0-9]/i', $username); } if (false === checkUsername($usernameCheck)) { echo 'ok'; } else { echo 'false';}
Output for 4.3.0 - 7.1.0
false