#37152 [Bgs]: __autoload is called with 'self'

From: Date: Fri, 21 Apr 2006 12:56:53 +0000
Subject: #37152 [Bgs]: __autoload is called with 'self'
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-96061@lists.php.net to get a copy of this message
ID: 37152 Updated by: mike@php.net Reported By: buchner dot johannes at gmx dot at Status: Bogus Bug Type: Scripting Engine problem Operating System: Any PHP Version: 5.1.2 New Comment: Dupe of bug #37138 Previous Comments: ------------------------------------------------------------------------ [2006-04-21 12:34:11] mike@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. It's self not 'self'. ------------------------------------------------------------------------ [2006-04-21 12:07:22] buchner dot johannes at gmx dot at 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37152&edit=1

« previous php.bugs (#96061) next »