I am using wamp with PHP version 5.5.12. I am trying to use http_response_code to set the code. When I use it, it returns true and not the value I set. I am a PHP newbie, and I wanted to know what I am missing in this. How do I get it to return 300 and not true?
getCode(300); // returns true and not with the code I set.
function getCode($code)
{
$statuscode = http_response_code($code);
echo $statuscode;
}