PHP exit(string) function

PHP function exit(int $status) uses numeric $status return code
but function exit(string $status) just outputs argument string.

The same is true for Python:

import sys


imports sys
sys.exit(“aa! errors!”)

In Perl there is only exit(int_code) variant available. However, we use die(‘last words’) or even better Carp::confess() with stack back trace.

In Ruby we can call
or Process.exit!(fixnum=-1) to exit immidiately
or abort("Message goes here")


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: