ID: 33902 Updated by: [EMAIL PROTECTED] Reported By: sveta at microbecal dot com -Status: Open +Status: Closed Bug Type: Scripting Engine problem Operating System: FreeBSD, WindowsXP PHP Version: 5.0.4 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: ------------------------------------------------------------------------ [2005-07-28 13:33:04] sveta at microbecal dot com Description: ------------ In my example type hinting in method foo() in child class is incompatible with same method in parent class. But it still working with E_STRICT. Reproduce code: --------------- error_reporting(E_ALL | E_STRICT); class A {} abstract class B { protected $bar; public function foo($bar) { $this->bar = $bar; echo "some\n"; return $this; } } class C extends B { public function foo(A $bar) { $this->bar = $bar; echo "not expected\n"; return $this; } } $c = new C; $c->foo(new A); Expected result: ---------------- Fatal error: Declaration of C::foo() must be compatible with that of B::foo() Actual result: -------------- not expected ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33902&edit=1