I cannot find the right way to send a custom HTTP status code with PHP (for example: 454). I've tried using:
header('HTTP/1.1 454', true);
header('X-PHP-Response-Code: 454', true);
with no avail. Even if I get the X-PHP-Response-Code: 454 line in the response header, a HTTP/1.1 500 Internal Server Error is always added at the top of it, overriding the status code.
I've tried http_response_code() too.
Is there any way to send a custom non-standard HTTP status code with PHP?
Thanks!