3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match("/^(?P<dir>img|js|css)\/(?P<path>[\/a-zA-Z0-9\-._~!$&'()*+,;=:@]+)$/", 'css/jquery.tweet.css', $m); var_dump($m);
Output for 4.3.3 - 7.1.7
array(5) { [0]=> string(20) "css/jquery.tweet.css" ["dir"]=> string(3) "css" [1]=> string(3) "css" ["path"]=> string(16) "jquery.tweet.css" [2]=> string(16) "jquery.tweet.css" }
Output for 4.3.0 - 4.3.2
array(3) { [0]=> string(20) "css/jquery.tweet.css" [1]=> string(3) "css" [2]=> string(16) "jquery.tweet.css" }