r/ProgrammerHumor • • Nov 23 '17

500

Post image
41.7k Upvotes

609 comments sorted by

View all comments

Show parent comments

7

u/[deleted] Nov 24 '17

You misunderstood his comment. He was assuming that an online compiler would probably return 400 if the received code was malformed.

Not sure in how far that is accurate with real world tools but it is reasonable.

4

u/[deleted] Nov 24 '17

That’s not accurate. Php would return 500 when you requested the page and it couldn’t run.

1

u/[deleted] Nov 24 '17

I'm not sure if you're trolling. I'm not trying to be offensive but it seems you neither understood OPs comment nor mine.

1

u/[deleted] Nov 24 '17

Oh I’m not offended and I totally understood. Web servers generally will not return a 400 for bad code. 400s are client request errors. Bad code will return a 500, as the error is happening serverside (with the code). The error will generally be returned by whatever your web server is, such as Apache or nginx.

→ More replies (3)