inheritance check too strict?
| From: | Stas Malyshev | Date: | Thu, 19 Aug 2010 07:51:15 +0000 |
| Subject: | inheritance check too strict? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-49447@lists.php.net to get a copy of this message | ||
Hi!
I recently noticed this code:
<?php
error_reporting(E_ALL | E_STRICT);
class ObjParent {
public function set($param2 = ''){ }
}
class ObjChild extends ObjParent {
public function set(){ }
}
produces a E_STRICT warning. I don't really see a point in it - there's no problem whatsoever with child function ignoring some arguments from parent call. Anybody could explain why this check is there?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227