Closed
Description
when a command throws a fatal error in PHP7, the exception produced is handled by global error handler, not application error handler.
thus the error message is properly handled, but the exit code is not.
such code for example (for tests or more) could lead to such behavior, under Symfony 2.8 / PHP 7
$a = null; $a->getSmth();
under PHP 5.3 the above command execution would exit with non zero exit code.
under PHP7.* this would end up with exit code being zero, which is not good.
the problem is in the - Symfony/Component/Console/Application.php:124,
where only \Exception class is catched
#20111