3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (!function_exists('http_response_codea')) { function http_response_codea($newcode = NULL) { static $code = 200; if($newcode !== NULL) { header('X-PHP-Response-Code: '.$newcode, true, $newcode); if(!headers_sent()) $code = $newcode; } return $code; } } echo http_response_codea(404);
based on M3GvR
Output for 5.2.3 - 7.2.0
404
Output for 4.3.0 - 5.2.2
200