ID:               33903
 Updated by:       [EMAIL PROTECTED]
 Reported By:      marcos dot neves at gmail dot com
 Status:           Assigned
 Bug Type:         Feature/Change Request
 Operating System: *
-PHP Version:      5.1.0b3
+PHP Version:      5.1.0
 Assigned To:      helly
 New Comment:

This has to be delayed until after 5.1 since it requires a complete
reqrite of the internal function handling. Maybe staic functions are
easier.


Previous Comments:
------------------------------------------------------------------------

[2005-07-28 14:02:26] marcos dot neves at gmail dot com

Description:
------------
What about spl_autoload_register accept class methods too, like usort
and other php functions

Reproduce code:
---------------
<?

class MyAutoLoader {

        function autoLoad($className) {
                // autload code
        }
}

spl_autoload_register(array('MyAutoLoader', 'autoLoad'));

// and

$myAutoLoader = new MyAutoLoader();
spl_autoload_register(array($myAutoLoader, 'autoLoad'));

?>

Expected result:
----------------
works!

Actual result:
--------------
Warning: spl_autoload_register() expects parameter 1 to be string,
array given in
C:\wamp\include_path\tests\spl\spl_autoload_register_class.test.php on
line 10

Warning: spl_autoload_register() expects parameter 1 to be string,
array given in
C:\wamp\include_path\tests\spl\spl_autoload_register_class.test.php on
line 15


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33903&edit=1

Reply via email to