Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42875 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35938 invoked from network); 29 Jan 2009 10:15:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jan 2009 10:15:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 83.243.58.133 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 83.243.58.133 mailout1.netbeat.de Linux 2.6 Received: from [83.243.58.133] ([83.243.58.133:51478] helo=mailout1.netbeat.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/60-31841-CC181894 for ; Thu, 29 Jan 2009 05:15:43 -0500 Received: (qmail 19072 invoked by uid 89); 29 Jan 2009 10:27:05 -0000 Received: from unknown (HELO ?192.168.1.103?) (johannes%schlueters.de@93.104.38.136) by mailout1.netbeat.de with ESMTPA; 29 Jan 2009 10:27:05 -0000 To: David =?ISO-8859-1?Q?Z=FClke?= Cc: Scott MacVicar , "Nathanael D. Noblet" , Peter Walther , internals@lists.php.net In-Reply-To: <6BE52E81-8E25-4247-92DE-D4737A1BD9BE@bitextender.com> References: <497E1FFB.5050404@gnat.ca> <497E5DF6.4060606@oracle.com> <1233063239.8505.10.camel@goldfinger> <497F37F8.6070407@gnat.ca> <49807F9E.4020401@pewasoft.com> <4980976D.60202@gnat.ca> <498098D7.2080901@macvicar.net> <6BE52E81-8E25-4247-92DE-D4737A1BD9BE@bitextender.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 29 Jan 2009 11:15:32 +0100 Message-ID: <1233224132.6378.6.camel@goldfinger> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] substr passing null... From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) Hi, On Thu, 2009-01-29 at 09:29 +0100, David Zülke wrote: > Out of curiosity - how hard would it be to implement a "default" > keyword that can be passed in function/method calls with the new > parameter parsing API? It would mean to introduce a new value type or tons of rewrites. But as I said there's all we need with "s!" as modifier then we can handle NULL-Params independently from a String-Parameter - where this makes sense. With other functions not NULL is the default but the value of some Flag-Parameter (const DEFAULT_VALUE = 1024; function foo($param = DEFAULT_VALUE);) so this is a case by case thing ... But as said before: We should check functions where we changed the parameter parsing to be as less BC as it makes sense. johannes