3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $char_set = 'a-z_'; $val = 'login_form'; $val = preg_replace('/[^'.preg_quote($char_set, '/').']+/i', '', $val); var_dump($val);
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(1) "_"
Output for 4.3.0 - 5.2.17
string(10) "login_form"