Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60186 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58467 invoked from network); 18 Apr 2012 12:14:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2012 12:14:16 -0000 Authentication-Results: pb1.pair.com header.from=gaochunhui@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=gaochunhui@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: gaochunhui@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:37861] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/6A-03614-510BE8F4 for ; Wed, 18 Apr 2012 08:14:14 -0400 Received: by pbcun1 with SMTP id un1so9653593pbc.29 for ; Wed, 18 Apr 2012 05:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; bh=SFkkSJFONirwpjqqUaCbBJMGrhhQ8vL8oIF4ffWb2Lk=; b=phBmJrM3aU/ijc0sKww7sbpslIREE83Yj0uZT5kjnoFJuIv2zjoCpD8KxO/PdpB2vq TxXtJUbv5I/fjQ/X5Sy9Dc4GMWT/5G/sz4sPddpwDMBIfCWzwyEdJW/dow+lD1qJwEJO kBkd+qthm+Dt7cfB9/CQ/yqez/rn/+hXIaVE2KMyyzHgEm/+6hdbHSovZT6Tk7t5lAbE 8/Vo7MLK/XUHKNLnQmemLOISgmFb1Sckh7z18h4fWDDRJUcmL5avphGzm6ElBl94z788 YEQr4djGuz7VzDcmdwT8Mr4seIzaYpmUv4U1JK8g0MI0e0sYPtRSsd0jyIXbFvSpMOxk 0qcg== Received: by 10.68.202.167 with SMTP id kj7mr6318015pbc.9.1334751251240; Wed, 18 Apr 2012 05:14:11 -0700 (PDT) Received: from W520 ([123.119.101.224]) by mx.google.com with ESMTPS id l1sm23572803pbe.54.2012.04.18.05.14.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Apr 2012 05:14:10 -0700 (PDT) To: "'Ferenc Kovacs'" , "'Stas Malyshev'" Cc: "'PHP Internals'" References: <4F8DF4B1.2040307@sugarcrm.com> In-Reply-To: Date: Wed, 18 Apr 2012 20:13:43 +0800 Message-ID: <002401cd1d5c$c18fb5b0$44af2110$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQH9F1VdbSW4u2TEWK0obXJHtsrR7wFpsQugljU8/yA= Content-Language: zh-cn Subject: =?utf-8?Q?=E7=AD=94=E5=A4=8D:_=5BPHP-DEV=5D_=5BRFC=5D_skipping_opt?= =?utf-8?Q?ional_parameters?= From: gaochunhui@gmail.com (=?utf-8?B?6auY5pil6L6J?=) +1. I LIKE https://wiki.php.net/rfc/namedparameters , please change OLD = decide. -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- =E5=8F=91=E4=BB=B6=E4=BA=BA: Ferenc Kovacs [mailto:tyra3l@gmail.com]=20 =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2012=E5=B9=B44=E6=9C=8818=E6=97=A5 = 15:19 =E6=94=B6=E4=BB=B6=E4=BA=BA: Stas Malyshev =E6=8A=84=E9=80=81: PHP Internals =E4=B8=BB=E9=A2=98: Re: [PHP-DEV] [RFC] skipping optional parameters On Wed, Apr 18, 2012 at 12:54 AM, Stas Malyshev = wrote: > Hi! > > One of the annoying things I've encountered in working with PHP was=20 > dealing with functions having long optional parameter lists,=20 > especially if you need to change only the last one - you have to copy=20 > all the defaults. Full named params implementation would solve it,=20 > probably, but before we have that here's an easier solution for part = of the problem: > > https://wiki.php.net/rfc/skipparams > > Basically, it allows you to do this: > > create_query("deleted=3D0", "name",,, /*report_errors*/ true); > > Implementation of it is here: > https://github.com/smalyshev/php-src/tree/skip_params > All things described in RFC seem to be working, please tell me if I=20 > forgot anything. If it's accepted I'll also add tests, etc. of course. > > I would prefer Named parameters, but this is still better than the = current situation. -- Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu