Hi jeroen!
On Wed, 17 Oct 2001, [EMAIL PROTECTED] wrote:

> 
> "Brian Moon" <[EMAIL PROTECTED]> wrote in message
> news:00c601c15725$d00cf0c0$[EMAIL PROTECTED]...
> > This is a huge compatibility breaker.  The sad part is that you did not
> > properly fix the bug in 9884.  The bug is that the compiler looks past a
> > return when compiling.
> 
> That is not the bug, all languages do that. PHP4 has always parsed the whole
> script, and will probably remain doing so.
> 
> The issue here is that a functiondefinition isn't put in the function table
> until the function definition is executed.
> 
> This allows conditional function declaration.
> 
> Zeev's bugfix fixed bug 9884 by changing semantics of return, by making
> 'return'-ing from a script simply not possible anymore.
> 
> > Does it look past an exit?
> 
> It looks past everything, but _return_ in the body of a script is ignored,
> but exit isn't. Using exit, nothing changed. Only return changed.
> 
so if i want to do
function f() { return include_once('big_function_body.php'); }

[big_function_body.php]
// stuff
return $object;

it won't work?

I was considering doing that for some classes that have pretty big methods,
but do I understand correctly that due to this change it cannot be used
anymore?

-- teodor

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to