{exit} calls padExit() and never comes back. The output buffers are emptied first, so nothing that was rendered before the tag ships either: the answer is status 200 with an empty body. The exit sequence still runs - the session is closed, the web headers are sent, the info and trace scopes that were open are ended - which is why a PAD application stops this way and never with PHP's exit or die.

From PHP the same is padExit (), and padExit ( 404 ) with a status code. To answer with an error status and the application's error page, use padAbort ( 404 ); to send the visitor elsewhere, {redirect}; to stop with a report, {error} or {dump}.