Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68827 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14796 invoked from network); 2 Sep 2013 07:31:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2013 07:31:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=laruence@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=laruence@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.173 as permitted sender) X-PHP-List-Original-Sender: laruence@gmail.com X-Host-Fingerprint: 209.85.217.173 mail-lb0-f173.google.com Received: from [209.85.217.173] ([209.85.217.173:46449] helo=mail-lb0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/12-32023-FCE34225 for ; Mon, 02 Sep 2013 03:31:28 -0400 Received: by mail-lb0-f173.google.com with SMTP id o14so3547419lbi.32 for ; Mon, 02 Sep 2013 00:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Pfhd1zCu8r97cU2ijcAVtblTMHJ+7xyKSRRbl9IRjzg=; b=HOfYOKdKAxZDn9ECA0uSBvZQxbFqBhOlITAclDzyRjOjmUOp3M1/T6K8zVYatdpy3X w6oE7JDKjABJ7iiRMcY7m1/jd7YW6p4wi+QBqf1lgDg3pJuRVXvM1C2skYulhpBNhfXp so17noeVXI/Kaes2cfKaID1SX69gYFlqgt3RbPvNAzO3S2ixgmAd8nAc9GunJcP/B5jg ZPRzLPY27mPyVjwHvBmcZ2qaYoo7Hmi/5s1pxmQO1SuCVOV7Vkd4q8e8c1kogNiq76+X LN/auY1DGpaDnDinXtr6kvWFrfFYS8XpIqKG8KferiNO3e6Tm9MfILrv4U8U5pr/Guha dNtA== X-Received: by 10.152.88.74 with SMTP id be10mr20649208lab.4.1378107084120; Mon, 02 Sep 2013 00:31:24 -0700 (PDT) MIME-Version: 1.0 Sender: laruence@gmail.com Received: by 10.114.224.228 with HTTP; Mon, 2 Sep 2013 00:31:04 -0700 (PDT) In-Reply-To: <52243BA6.5040905@sugarcrm.com> References: <52243BA6.5040905@sugarcrm.com> Date: Mon, 2 Sep 2013 15:31:04 +0800 X-Google-Sender-Auth: 2HjO7OHjnVPByXKl_H-6jD6fp9Q Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Skipping parameters take 2 From: laruence@php.net (Laruence) On Mon, Sep 2, 2013 at 3:17 PM, Stas Malyshev wrote: > Hi! > > I've finally took some time to revive the skipping parameter RFC and > patch. For those who doesn't remember what it is please see: > https://wiki.php.net/rfc/skipparams > TLDR version: > > The idea is to allow skipping parameters in function with optional > arguments so that this: > function create_query($where, $order_by, $join_type='INNER', $execute > = false, $report_errors = true) > > can be called like this: > create_query("deleted=0", "name", default, default, > /*report_errors*/ true); > Hey: I am not sure whether this is a little overhead. but if we do want this. to be honest, I even prefer leave it empty to "default". like create_query("delete=0", "name", , , true); thanks > Instead of trying to remember what the defaults are. > The patch is here: > > https://github.com/php/php-src/pull/426 > > Any comments or feedback on the RFCs and the code are welcome, > especially pointing out the cases where it may not work (which means we > need more phpt's there :) > -- > Stanislav Malyshev, Software Architect > SugarCRM: http://www.sugarcrm.com/ > (408)454-6900 ext. 227 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Laruence Xinchen Hui http://www.laruence.com/