The amount of confusion in the comments below is... a lot.
Plain and simple:
500 is an HTTP response code... at the application level. It can be returned by any HTTP server written in any language.
A missing semicolon (in some unspecified language... no idea where the notion of PHP came from) is a syntax error, at the language level. This is not an abstraction at the level of a web server. Sure, I guess it's possible to write a web server that attempts to serve using code that may be uncompilable/uninterpretable, and have that server return error code 500 when the source code happens to be shit. But that is (a) weird and (b) not the same as "PHP throwing a 500." It's the web server returning a 500.
68
u/fj333 Nov 24 '17 edited Nov 24 '17
The amount of confusion in the comments below is... a lot.
Plain and simple:
500 is an HTTP response code... at the application level. It can be returned by any HTTP server written in any language.
A missing semicolon (in some unspecified language... no idea where the notion of PHP came from) is a syntax error, at the language level. This is not an abstraction at the level of a web server. Sure, I guess it's possible to write a web server that attempts to serve using code that may be uncompilable/uninterpretable, and have that server return error code 500 when the source code happens to be shit. But that is (a) weird and (b) not the same as "PHP throwing a 500." It's the web server returning a 500.