|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-21 12:34 UTC] mike@php.net
[2006-04-21 12:56 UTC] mike@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 18:00:01 2025 UTC |
Description: ------------ autoloader shouldn't be called with the parameter 'self' or call_user_func(array('self','method')) shouldn't be working. Reproduce code: --------------- class A{ function A(){ call_user_func(array("self","f")); } function f(){ echo "A::f()<br/>"; } } function __autoload($class){ echo "autoloader: $class <br/>"; } $a = new A(); Expected result: ---------------- just: A::f() Actual result: -------------- autoloader: self A::f() autoloader is called with the argument self as classname. Of course, call_user_func(array($this,"f")); is a workaround.