note 34517 added to function.function-exists
| From: | breadman at rack1 dot php dot net | Date: | Tue, 29 Jul 2003 22:17:02 +0000 |
| Subject: | note 34517 added to function.function-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-52966@lists.php.net to get a copy of this message | ||
Functions within a function are better off as anonymous returns from create_function(), unless you
want to be able to call it elsewhere.
However, I have used this in skinning: I use alert_box() to display certain errors, like a faulty
SQL query. This simply calls display_alert(), which is defined in my skin scripts. However,
alert_box() is sometimes called before I know which skin to load, so it has its own functionality
which it uses if function_exists('display_alert') returns false.
----
Manual Page -- http://www.php.net/manual/en/function.function-exists.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34517
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34517&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34517&report=yes