3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $p = "oauth2provider.server.main.grant_type.access_keys"; preg_match('~^oauth2provider.server(?:.([a-zA-Z0-9_]+))(?:.(grant_type|storage))(?:.([a-zA-Z0-9_]+)*)$~', $p, $m); var_dump($m);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(4) { [0]=> string(49) "oauth2provider.server.main.grant_type.access_keys" [1]=> string(4) "main" [2]=> string(10) "grant_type" [3]=> string(11) "access_keys" }