3v4l.org

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