RE: [PHP-DEV] nested functions

From: Date: Fri, 02 Feb 2001 14:39:53 +0000
Subject: RE: [PHP-DEV] nested functions
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-45611@lists.php.net to get a copy of this message
Is there a need for nested funcitons? I don?t think so. -Marten. Icq# 38863127 -----Original Message----- From: Andrei Zmievski [mailto:andrei@ispi.net] Sent: Friday, February 02, 2001 3:22 PM To: Hartmut Holzgraefe Cc: php-dev@lists.php.net Subject: Re: [PHP-DEV] nested functions On Fri, 02 Feb 2001, Hartmut Holzgraefe wrote: > > it is right now possible to declare functions within functions > (see bug#9064) > > this will lead to redeclaration errors if you call the outer > function more then once > > i'm not sure about it, is this a usefull feature (although it > behaves very different to, say, PASCAL or gcc with nested > functions enabled where the inner function is 'local' to the > namespace of the outer one) or should the engine prevent > nested function declarations in the first place? How about a simple check: function outer() { if (!function_exists('inner')) { function inner() { } } } -Andrei * Entropy isn't what it used to be. * -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.dev (#45611) next »