3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $pattern = '/^([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*[\/\\\\]?)*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/D'; $class = 'Foo'; var_dump(preg_match($pattern, $class));
based on mAr0p
Output for 5.6.0 - 7.3.0rc3
int(1)