Is PHP exit status only useful when launched from the command line?

I was just reading the documentation for PHPexit .

It says that you can pass an integer (0-254), which will become the exit code ...

exit(5);

Is this only useful when working with PHP under the CLI? Can Apache use the error code for anything? Will PHP working normally always use exit code 0?

thank

+3
source share
1 answer

, - , ( exit) CLI. - HTTP, .

PHP sapi. , php_cli.c exit(exit_status); . , cgi . , - .

+5

Source: https://habr.com/ru/post/1774006/


All Articles