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
sys.exit(0)

and

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
exit(
fixnum=-1)
or Process.exit!(fixnum=-1) to exit immidiately
or abort("Message goes here")

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: