3v4l.org

run code in 150+ 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 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
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 hhvm-3.10.0

Process exited with code 153.
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" }