#35347 [Asn->Bgs]: missing E_STRICT when calling static methods from class

From: Date: Wed, 23 Nov 2005 13:46:28 +0000
Subject: #35347 [Asn->Bgs]: missing E_STRICT when calling static methods from class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-88783@lists.php.net to get a copy of this message
ID: 35347 Updated by: dmitry@php.net Reported By: bjori@php.net -Status: Assigned +Status: Bogus Bug Type: Class/Object related PHP Version: 5.1.0RC6 Assigned To: dmitry New Comment: This is not a bug. bar::foo() in __construct() does call bar() as normal (non-static) method. In the same way as self::bar() or $this->bar() do. Previous Comments: ------------------------------------------------------------------------ [2005-11-23 13:54:15] tony2001@php.net Dmitry, please check it out. ------------------------------------------------------------------------ [2005-11-23 11:23:50] bjori@php.net Description: ------------ Missing E_STRICT when calling non-static method from class method Reproduce code: --------------- <?php class foo { function bar() { print "foo::bar()\n"; } } class bar { function __construct() { foo::bar(); } } new bar; foo::bar(); ?> Expected result: ---------------- Strict Standards: Non-static method foo::bar() should not be called statically in .. foo::bar() Strict Standards: Non-static method foo::bar() should not be called statically in .. foo::bar() Actual result: -------------- foo::bar() Strict Standards: Non-static method foo::bar() should not be called statically in ... foo::bar() ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35347&edit=1

« previous php.bugs (#88783) next »