Re: PHP 4.0 Bug #9064 Updated: Functions inside functions cause errors if the outer function is called twice.

From: Date: Sat, 03 Feb 2001 13:56:13 +0000
Subject: Re: PHP 4.0 Bug #9064 Updated: Functions inside functions cause errors if the outer function is called twice.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-45666@lists.php.net to get a copy of this message
hi, > ID: 9064 > Updated by: hholzgra > Reported By: chriskl@familyhealth.com.au > Old-Status: Open > Status: Closed > Bug Type: Scripting Engine problem > Assigned To: > Comments: > > php has no "nested function" feature like you'll find in PASCAL > or in gcc if you enable the feature > > what happens here is that test2 is registered on execution of > test in the global namespace, and when you call test a second time > it cannot register test2 again > > (the engine shouldn't accept nested functions at all i think) why not - imagine the case you want to define a function with an eval('function body here'); at i am using this feature - i have a project with many long functions and do not need them in all logic paths. i define (let php parse) them on demand and this is faster. i have tried to have functions in separate files but this is slower than having all of them into array and etc. b.

« previous php.dev (#45666) next »