3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match('/^[\w-\.]+$/', 'admin.general.canViewPrivateUserOptions', $matches); var_dump($matches); preg_match('/^[\\w-\\.]+$/', 'admin.general.canViewPrivateUserOptions', $matches); var_dump($matches);
Output for 7.3.0alpha1 - 7.3.0beta1
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /in/ujlgg on line 3 NULL Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /in/ujlgg on line 6 NULL
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.2.11
array(1) { [0]=> string(39) "admin.general.canViewPrivateUserOptions" } array(1) { [0]=> string(39) "admin.general.canViewPrivateUserOptions" }