From: sr at brightlight dot ch Operating system: Irrelevant PHP version: 5.0.4 PHP Bug Type: Feature/Change Request Bug description: __autoload() for interfaces and functions
Description: ------------ __autoload() is very nice, but classes are not the only problem. Please add a parameter $type to allow functions and interfaces become autoloaded as well. Even more convenient if there were not only the types 'class', 'interface' and 'function', but also 'method' to autoload methods of classes. Example given. Reproduce code: --------------- function __autoload($name, $type) { // $type would be 'class', 'interface', 'function' or 'method' require_once("$type.$name.inc"); } -- Edit bug report at http://bugs.php.net/?id=33525&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33525&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33525&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33525&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33525&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33525&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33525&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33525&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33525&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33525&r=support Expected behavior: http://bugs.php.net/fix.php?id=33525&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33525&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33525&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33525&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33525&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33525&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33525&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33525&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33525&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33525&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33525&r=mysqlcfg