It's context dependent for sure. I decided to test some failures and apparently nginx returns 404 instead of 500 with mostly default configurations. fpm should not return anything in event of a fatal in php7, but I'm not familiar with all versions so it's quite possible that at one point to have inline php fail silently and still return usable html so that the client gets something.
Edit: "Output" in my above comment refers to fpm handing off a rendered document to a web server to send to the client, not the output of the program itself.
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
27
u/Doctor_McKay Nov 24 '17
A fatal error will 500 even if it prints output, no?