Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13549 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 94565 invoked by uid 1010); 27 Oct 2004 00:21:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 94529 invoked by uid 1007); 27 Oct 2004 00:21:06 -0000 Message-ID: <20041027002106.94528.qmail@pb1.pair.com> To: internals@lists.php.net Date: Tue, 26 Oct 2004 21:21:03 -0300 References: <20041022174124.27478.qmail@pb1.pair.com> Lines: 24 User-Agent: KNode/0.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Posted-By: 200.196.109.2 Subject: RE: [PHP-DEV] Type hints with null default values From: cunha17@uol.com.br (Cristiano Duarte) So reading all posts on this subject, the proposal would be: 1) Allow null typehints public function Compare([BaseClass] $objA, $cmpFunc); Ex: Compare(null, 'func1'); 2) Don't allow null typehints public function Compare(BaseClass $objA, $cmpFunc); Ex: Compare(new BaseClass(), 'func1'); 3) Optional argument (with typehint) public function Compare($cmpFunc, BaseClass $objA=null); Ex: Compare('func1'); Am I right ? Is it possible to implement all three syntaxes ? IMH it would satisfy everybody's needs. Regards, Cristiano Duarte