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