Req #52385 [NEW]: Support for autoloading functions
| From: | php-bugs at majkl578 dot cz | Date: | Wed, 21 Jul 2010 03:29:56 +0000 |
| Subject: | Req #52385 [NEW]: Support for autoloading functions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-152557@lists.php.net to get a copy of this message | ||
From:
Operating system: Irrelevant
PHP version: 5.3.3RC3
Package: SPL related
Bug Type: Feature/Change Request
Bug description:Support for autoloading functions
Description:
------------
Would it be possible to add a support for autoloading user-defined
functions? Currently only classes are supported by either __autoload or
spl_autoload or spl_autoload_register. Including all
functions is really awful job whereas classess could be autoloaded nicely
(imagine implementation for spl_autoload_register which scans a directory
for classess and then includes specific file). I suggest
to make possible something similar to the example above for normal
functions (global as well as those in namespaces). PS: I
know that it could be hacked by emulating namespace with class (eg. static
method String::webalize()) but since PHP 5.3 it would be probably nicier
not to hack it with classes, but place it to namespace as a regular
function (String\webalize()).
--
Edit bug report at http://bugs.php.net/bug.php?id=52385&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52385&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52385&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52385&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52385&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52385&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52385&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52385&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52385&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52385&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52385&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52385&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52385&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52385&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52385&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52385&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52385&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52385&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52385&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52385&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52385&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52385&r=mysqlcfg