note 23380 deleted from function.exit by nlopess
| From: | nlopess@php.net | Date: | Tue, 27 Apr 2004 13:21:50 +0000 |
| Subject: | note 23380 deleted from function.exit by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-68879@lists.php.net to get a copy of this message | ||
Note Submitter: shaun@NOshatSPAM.net
----
Note that the argument to exit() does not have to be a literal string, it can also be a function.
For example, I have a function named error($type, $bgcolor, $message) which outputs an error message
inside of an HTML table (it looks a little nicer than a plaintext error in the middle of a page). I
was happy to notice that I can use this function along with exit(), e.g.
if(!isset($foobar))
exit(error("Fatal", "#FF0000", "Execution terminated because foobar
wasn't set"));