I think it means being able to scope the default execution block for a
script.  Normally script goes from top-to-bottom dipping into each
include and compiles and executes them in a linear fashion.

Perhaps having a main would hold off on the execution part until you got
to the main() and from there, only execute that which is used inside
that block and then exit.

The "main method of a class" idea I always felt was unnatural in Java.
A C/C++ style main() as I describe above could be interesting.  I wonder
if it has any compelling benefits to it, or rather what would the
advantage be over how PHP is executed today?

Al

On Tue, 2005-06-28 at 18:36 -0400, Nicolas Bérard Nault wrote:

> What do you mean by the script being a class ?
> 
> On 6/28/05, Jesse Binam <[EMAIL PROTECTED]> wrote:
> > Any thoughts on the idea of a magic method called "__main()" or
> > "__exec()" that would be called if the script being executed is a
> > class.
> > 
> > --
> > PHP Internals - PHP Runtime Development Mailing List
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> > 
> -- 
> Nicolas Bérard Nault ([EMAIL PROTECTED])
> "Maybe nature is fundamentally ugly, chaotic and complicated. But if
> it's like that, then I want out." -- Steven Weinberg (prix Nobel de
> physique, 1979).
> 

Reply via email to