On Tuesday, February 18, 2003, at 10:27 AM, Ford, Mike [LSS] wrote:
Okay, so PHP stores all functions that are not class methods in a global namespace? Or does it even do this with methods?Well, it kinda does, but as it doesn't limit the scope in any way there'sI have a script, "registration.php", which calls require_once on the Registrant.class file mentioned in the above error message. The Registrant::setPhone() method is called more than once. Since it is called more than once, the function "isValidPhoneNumber()" defined within setPhone() is defined more than once, which I suspect is the source of the problem. Does PHP not allow you to define a function within a function and then call the enclosing function more than once?
not really any point. Besides, it can lead to the kind of problems you're
experiencing. Just declare the two functions sequentially in your include
file.
Just curious so I don't depend on anything I'm used to from other languages.... thanks!
Erik
--
Erik Price
email: [EMAIL PROTECTED]
jabber: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php