Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19484 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6472 invoked by uid 1010); 7 Oct 2005 20:36:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6457 invoked from network); 7 Oct 2005 20:36:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2005 20:36:56 -0000 X-Host-Fingerprint: 80.237.132.12 wp005.webpack.hosteurope.de Linux 2.5 (sometimes 2.4) (4) Received: from ([80.237.132.12:40245] helo=wp005.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C5/5F-54476-86CD6434 for ; Fri, 07 Oct 2005 16:36:56 -0400 Message-ID: Received: by wp005.webpack.hosteurope.de running Exim 4.43 using esmtpa from dslb-084-057-009-156.pools.arcor-ip.net ([84.57.9.156] helo=WOMBERT) id 1ENyxY-0004Dr-B0; Fri, 07 Oct 2005 22:36:52 +0200 To: Date: Fri, 7 Oct 2005 22:36:45 +0200 Organization: bitXtender GbR MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: Thread-Index: AcXLffavwJnFJxLGRLuoVDXd4dcxpQAAKR6A Subject: RE: [PHP-DEV] Type Hints with Null From: dz@bitxtender.com (=?iso-8859-1?Q?David_Z=FClke?=) References: Lovely. - David > -----Original Message----- > From: Derick Rethans [mailto:derick@php.net] > Sent: Friday, October 07, 2005 10:30 PM > To: PHP Developers Mailing List > Subject: [PHP-DEV] Type Hints with Null > > Hello, > > attached is a patch (by Markus) that allows you to make typehints > optionally take NULL as default value too, f.e.: > > class P { } > class T { > function f(P $p = NULL) { > var_dump($p); > } > } > > $o=new T(); > $o->f(new P); > $o->f(NULL); > $o->f(); > > I would like to commit this patch to HEAD pending any objections. > > regards, > Derick > > -- > Derick Rethans > http://derickrethans.nl | http://ez.no | http://xdebug.org