Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60149 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79701 invoked from network); 18 Apr 2012 03:48:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2012 03:48:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=adamjonr@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=adamjonr@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.170 as permitted sender) X-PHP-List-Original-Sender: adamjonr@gmail.com X-Host-Fingerprint: 209.85.214.170 mail-ob0-f170.google.com Received: from [209.85.214.170] ([209.85.214.170:33378] helo=mail-ob0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/D2-21594-B793E8F4 for ; Tue, 17 Apr 2012 23:48:12 -0400 Received: by obbup16 with SMTP id up16so2612877obb.29 for ; Tue, 17 Apr 2012 20:48:08 -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 :content-type; bh=4C9gC9oRNVR54lneExWRSJa7U1dXvml46Ak0VXVNsj0=; b=wzZ4xx8MPb+QQN4cpKtvVwa/5io5n6cuWvY5HvvnT5d9uCntiJ3K3bF5re1FgyX3uJ 5ATzDThgzNN3b3WGnOFYW2Xv1b8M5m0XOI7+E/PNsOUKquMKKCpkVnwm5KeEmihlxrM0 hSFeSY6FToA9MFUj2AMfgpFbO2KuQnKyJM68nDglmcudTSVhKVPkNysKS64bMRay4gF5 N2v/c43euUCifs1NoPvB2eFLYV/KYnVYeRIaH7vaHZqHNQbLiqd97AG9sAVCHOyixu7f sjGAU2U/8ORFT+it2TYwC78khJ1Fv2nVIzlseuRkJt6FDpPTGAiBpTWyVYK9rPLx/+lW r++A== MIME-Version: 1.0 Received: by 10.60.6.8 with SMTP id w8mr932446oew.3.1334720888838; Tue, 17 Apr 2012 20:48:08 -0700 (PDT) Received: by 10.182.43.74 with HTTP; Tue, 17 Apr 2012 20:48:08 -0700 (PDT) In-Reply-To: <4F8DF4B1.2040307@sugarcrm.com> References: <4F8DF4B1.2040307@sugarcrm.com> Date: Tue, 17 Apr 2012 23:48:08 -0400 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=e89a8ff2517e7419bf04bdebecd3 Subject: Re: [PHP-DEV] [RFC] skipping optional parameters From: adamjonr@gmail.com (Adam Jon Richardson) --e89a8ff2517e7419bf04bdebecd3 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Apr 17, 2012 at 6:54 PM, Stas Malyshev wrote: > 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=0", "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. Stas, this is fantastic! Not a voter, but I would be very thankful for this addition to PHP. Adam --e89a8ff2517e7419bf04bdebecd3--