3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match('~^HTTP/1\.\d (?P<status>\d+)~', 'HTTP/1.1 302 Found', $matches); var_dump($matches);
Output for 4.3.3 - 7.2.0
array(3) { [0]=> string(12) "HTTP/1.1 302" ["status"]=> string(3) "302" [1]=> string(3) "302" }
Output for 4.3.0 - 4.3.2
array(2) { [0]=> string(12) "HTTP/1.1 302" [1]=> string(3) "302" }