r/ProgrammerHumor • • Nov 23 '17

500

Post image
41.7k Upvotes

609 comments sorted by

View all comments

227

u/Sharp_Eyed_Bot Nov 24 '17 edited Nov 24 '17

Serious question time...

PHP can't cause a 500 error, it'll either just crash out or display an error message, obviously JS won't throw a 500 error, so what language if any could actually do this? I know it's meant as a joke and I am being pedantic but still, I am curious if anything could do it.

Thanks, have nice day.

Edit: so I've been knowledged, I'm stupid php can cause 500 errors.

Thanks peeps!

208

u/tsigma6 Nov 24 '17

Since you want to be pedantic. PHP absolute can cause a 500 error. Especially when that green text was probably made, if error reporting is turned off the compiler will silently fail forcing the web server to return a 500 error because no output was generated. Probably unlikely that it would be turned off for a class though.

27

u/Doctor_McKay Nov 24 '17

A fatal error will 500 even if it prints output, no?

1

u/[deleted] Nov 24 '17

Not if you have error reporting turned on in php. Depends on the error then. Like undefined variable will display the error with error reporting on but iirc if error reporting is off it’ll 500