#50735 [Opn]: feature request
| From: | h dot riepma at gmail dot com | Date: | Wed, 13 Jan 2010 02:18:24 +0000 |
| Subject: | #50735 [Opn]: feature request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146598@lists.php.net to get a copy of this message | ||
ID: 50735
User updated by: h dot riepma at gmail dot com
Reported By: h dot riepma at gmail dot com
Status: Open
Bug Type: Unknown/Other Function
Operating System: ubuntu
PHP Version: 5.2.12
New Comment:
yes i know theres a logic error there...
<?
__autoload($n){
if(!function_exists('functions/'.$n)) require_once('functions/'.$n);
}
n_md5('test');
?>
Previous Comments:
------------------------------------------------------------------------
[2010-01-13 02:15:31] h dot riepma at gmail dot com
Description:
------------
not a bug, but http://www.php.net/sitemap.php said to
put features here
too...
would love to have __autoload effect functions as well as classes...
Reproduce code:
---------------
<?
__autoload($n){
if(!function_exists($n)) require_once('functions/'.$n);
}
n_md5('test');
?>
Expected result:
----------------
functions/n_md5 required automatically and ran as normal
Actual result:
--------------
Fatal error: Call to undefined function n_md5() in
/var/www/autoload.php on line 5
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50735&edit=1