29
Nov
09

Ooops!!! there is no difference in die() and exit(). die() is equivalent to exit  and vice versa. But  why these two names because of there are functions which changed names because of an API cleanup or some other reason and the old names are only kept as aliases for backward compatibility. ;)

php.net says

There are quite a few functions in PHP which you can call with more than one name. In some cases there is no preferred name among the multiple ones, is_int() and is_integer() are equally good for example. However there are functions which changed names because of an API cleanup or some other reason and the old names are only kept as aliases for backward compatibility. It is usually a bad idea to use these kind of aliases, as they may be bound to obsolescence or renaming, which will lead to unportable script. This list is provided to help those who want to upgrade their old scripts to newer syntax.

References

http://php.net/manual/en/aliases.php
http://www.php.net/manual/en/ref.misc.php

  • del.icio.us
  • Digg
  • Facebook
  • LinkedIn
  • Google Bookmarks
  • Twitter
  • MySpace
  • Mixx
  • Reddit
  • DZone
  • Sphinn
  • StumbleUpon
  • Blogplay
  • Diigo
  • Live
  • MSN Reporter
  • Technorati
  • NewsVine
  • Yahoo! Bookmarks
  • Netvibes
  • Design Float
  • Add to favorites
  • email
  • Yahoo! Buzz
  • Gwar
  • FriendFeed
  • Tumblr
  • Print
  • PDF
  • RSS
This entry was posted in PHP, Shell and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>