Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37292 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88178 invoked from network); 29 Apr 2008 13:37:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Apr 2008 13:37:39 -0000 Authentication-Results: pb1.pair.com header.from=sam@sambarrow.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sam@sambarrow.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain sambarrow.com from 208.70.128.77 cause and error) X-PHP-List-Original-Sender: sam@sambarrow.com X-Host-Fingerprint: 208.70.128.77 smtp-gw51.mailanyone.net Received: from [208.70.128.77] ([208.70.128.77:41431] helo=smtp-gw51.mailanyone.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5F/53-03498-2A427184 for ; Tue, 29 Apr 2008 09:37:38 -0400 Received: from mailanyone.net by smtp-gw51.mailanyone.net with esmtpsa (TLSv1:RC4-MD5:128) (MailAnyone extSMTP sam@sambarrow.com) id 1Jqq1X-0002i0-Sh for internals@lists.php.net; Tue, 29 Apr 2008 08:37:36 -0500 To: internals@lists.php.net Content-Type: text/plain Date: Tue, 29 Apr 2008 09:34:07 -0400 Message-ID: <1209476047.3257.2.camel@sbarrow-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Subject: Inheritance/compatibility behavior From: sam@sambarrow.com (Sam Barrow) I want to make two classes: abstract class a { abstract public function go($a); } final class b extends a { abstract public function go(array $a); } This will not work, I get an error that the two must be compatible. Wouldn't it be a good idea to allow any type hint for a parameter that does not specify a type hint? Ie, I can do the above, but not the following: abstract class a { abstract public function go(myClass $a); } final class b extends a { abstract public function go(array $a); }