> Why won't any of you give a good reason why it won't work? How come this
> works:
>
> function foo() {
> 2+2==4 or die("The world is ending, or at least your processor!");
> }
>
> But this doesn't:
>
> function foo() {
> 2+2==4 or return("The world is ending, or at least your processor!");
> }
>
> The way I see it, there's something really odd going on here.
Directly from the docs:
http://ca3.php.net/manual/en/function.return.php
First line:
"If called from within a function, the return() statement
immediately ends execution of the current function"
Important concept:
IMMEDIATELY returns.
Learn to read.
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php