Found this while debugging a page cache problem for a customer.
Other SAPI implementations, like mod_php, fastcgi, etc, will return "200" for http_response_code() if you haven't explicitly set it (there are several ways to set it, of course).
Litespeed's sapi returns an empty string if you haven't done something to set it.
A simple test:
Litespeed's sapi will print out "rc is []", other popular sapi implementations print "rc is [200]".
The manual page for http_response_code (here: http://php.net/manual/en/function.http-response-code.php ) says this:
Other SAPI implementations, like mod_php, fastcgi, etc, will return "200" for http_response_code() if you haven't explicitly set it (there are several ways to set it, of course).
Litespeed's sapi returns an empty string if you haven't done something to set it.
A simple test:
<?php
$rc=http_response_code();
print "rc is [$rc]\n";
?>print "rc is [$rc]\n";
Litespeed's sapi will print out "rc is []", other popular sapi implementations print "rc is [200]".
The manual page for http_response_code (here: http://php.net/manual/en/function.http-response-code.php ) says this: