Function/Constant autoloading
| From: | Sebastian Krebs | Date: | Tue, 26 Jul 2011 08:18:23 +0000 |
| Subject: | Function/Constant autoloading | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-54196@lists.php.net to get a copy of this message | ||
Hi,
Maybe this topic occured already, then sorry when I'm wasting your time, but I'm wondering, why there is no autoloading for functions and (namespace)constants.
When a class is not found, then an userland function is called. Thus I don't see a reason, why something like this doesn't exists for functions and (namespace)constants too, because using them is quite uncomfortable right now compared to classes and the decision _how_ to load them would be on the developers-side anyway.
Sebastian Krebs