Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60162 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8601 invoked from network); 18 Apr 2012 07:19:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2012 07:19:03 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@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: tyra3l@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:51393] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/B0-03614-4EA6E8F4 for ; Wed, 18 Apr 2012 03:19:00 -0400 Received: by pbcun1 with SMTP id un1so9361741pbc.29 for ; Wed, 18 Apr 2012 00:18:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=s49Ld7SvJtP3tJIDb+Cz+03g9ytFQV5jWCH4xvqxT4s=; b=AwxR7XAlgPcFqmKo2ey39ymViPTfBBImTclLjSVV5j2hvBo12pmYxOWKyf70o1rL3X pN4o3u2GexLOYxAtKYcwmwus8Qu7pokZ20OFtwpPx39rbAePV1RtSrm0W8MD/+3o178o W7UzGOqmS9BiKY6qyLOT0uyf7fSPCNAyFqz1NQdl09+h+KYbxYWB3dK8bhYiC6ir+joK U8qqrzW23LPSVTPf02Rtnh/NJxqTk6S+c9WhjMfXZYyUZCVne+PbGzxZ7QqaH96f42yG aTYyV8LrqXmuB2wr3zYcufsDXBC9zFkavuGxCzDsP/5tAb+B9ZT1JuMEGvIoe3aHobSZ c+0w== MIME-Version: 1.0 Received: by 10.68.225.198 with SMTP id rm6mr4105668pbc.89.1334733527279; Wed, 18 Apr 2012 00:18:47 -0700 (PDT) Received: by 10.68.227.201 with HTTP; Wed, 18 Apr 2012 00:18:47 -0700 (PDT) In-Reply-To: <4F8DF4B1.2040307@sugarcrm.com> References: <4F8DF4B1.2040307@sugarcrm.com> Date: Wed, 18 Apr 2012 09:18:47 +0200 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7b2e0897c3683804bdeeddfb Subject: Re: [PHP-DEV] [RFC] skipping optional parameters From: tyra3l@gmail.com (Ferenc Kovacs) --047d7b2e0897c3683804bdeeddfb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Apr 18, 2012 at 12:54 AM, Stas Malyshev wro= te: > Hi! > > One of the annoying things I've encountered in working with PHP was > dealing with functions having long optional parameter lists, especially > if you need to change only the last one - you have to copy all the > defaults. Full named params implementation would solve it, 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 > 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. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --047d7b2e0897c3683804bdeeddfb--