#44144 [Opn->Csd]: spl_autoload_functions() should return object instance when appropriate
| From: | colder@php.net | Date: | Fri, 29 Feb 2008 13:48:41 +0000 |
| Subject: | #44144 [Opn->Csd]: spl_autoload_functions() should return object instance when appropriate | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122800@lists.php.net to get a copy of this message | ||
ID: 44144
Updated by: colder@php.net
Reported By: ezyang@php.net
-Status: Open
+Status: Closed
Bug Type: SPL related
Operating System: Irrelevant
PHP Version: 5.3CVS-2008-02-18 (CVS)
-Assigned To:
+Assigned To: colder
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2008-02-18 02:07:06] ezyang@php.net
Description:
------------
spl_autoload_functions() should return object instances, not class
names, when appropriate.
Reproduce code:
---------------
<?php
class Foo {
public function nonstaticMethod() {}
}
$foo = new Foo;
spl_autoload_register(array($foo, 'nonstaticMethod'));
$funcs = spl_autoload_functions();
print_r((int) is_object($func[0][0]));
Expected result:
----------------
1
Actual result:
--------------
0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44144&edit=1