From the docs for the exit() function:
Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully.
I had thought these were http status codes and had been using them as such (I was confused why my exit(400) call was returning an empty string).
The docs only explicitly mention 0 and 255 as having special meaning and I can't seem to find any documentation anywhere describing what the other 254 codes are meant to be or if they're reserved or anything like that. I also can't really figure out why it would even use a different status code system from http in the first place.
Also, since this isn't https status codes. What is the best way to send those? Should I just echo a number? Put the number as the 'message' in exit ie. exit('400')? Should I even use http status codes at all vs just sending boolean or flags or the like in my responses?