Maybe a dump question, but wouldn't it get considered only, AFTER PHP has
found that the function does not exist?

Technically, this can be done - i.e. engine can be patched so that instead of throwing an error or refusing the call it would call appropriate function which would allow for autoloading.

However, I think autoloading functions if conceptually wrong. One rarely keeps functions individually separated in different files (while this is routinely happening - and is recommended - for classes). So, if you want to autoload functions you would either have to build complex tables of where each function lives or organize them in some well-defined modules. Such modules are called "classes" in OO-speak, so if you have a group of functions that are united by purpose and you want to autoload - why not to make a class out of them? And if there's just an assortment of unrelated functions - it would probably promote very ugly code if we allow to autoload them individually.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to