Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60140 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54659 invoked from network); 18 Apr 2012 00:03:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2012 00:03:32 -0000 Authentication-Results: pb1.pair.com header.from=ekneuss@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ekneuss@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: ekneuss@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:35796] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/5E-21594-1D40E8F4 for ; Tue, 17 Apr 2012 20:03:30 -0400 Received: by pbcun1 with SMTP id un1so9008366pbc.29 for ; Tue, 17 Apr 2012 17:03:27 -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:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9MUCBfy4c5h9616YqdZtvnWpNYtfOnz/a3xDg5xa4nY=; b=UXMQlGQUh1oBFsFg1+VOeyPNVML5uRsg9HwF062xk8cuHS9Tij0dpKfTNlM0BCbOND jczR4KpCL5kFtNSA4ESAha4ao5aqJLrdGnxDvVp8SOmJncycEp0lOqMbZYPHrCQBXqQq tuRwlxH88bxKuTTQm382jfzf7FRZ+R9e2w6/haGwgDnglT1zIaAtLH6KoPo6teHtI0hU LVzHkpo3Zb7yCAXT2dNylwqvaDcLJ1Qbue9I1M1LBmYA+HyO4Issn16eyQNuTxpy6QpI A/N8zSvVgZAxfsYMO68G/y0JahS7H29orKdoGaw7BFJZ0qNbg/b4kWAbLF0aq8Hw7P5R hmJQ== MIME-Version: 1.0 Received: by 10.68.194.136 with SMTP id hw8mr1531937pbc.10.1334707407159; Tue, 17 Apr 2012 17:03:27 -0700 (PDT) Sender: ekneuss@gmail.com Received: by 10.68.72.6 with HTTP; Tue, 17 Apr 2012 17:03:27 -0700 (PDT) In-Reply-To: <4F8E0347.9080609@sugarcrm.com> References: <4F8DF4B1.2040307@sugarcrm.com> <0CBF8A52-E369-4F31-9415-43126FA03904@welsh.co.nz> <4F8E0347.9080609@sugarcrm.com> Date: Wed, 18 Apr 2012 02:03:27 +0200 X-Google-Sender-Auth: zWOl5fbSe8cR7wD6L_TxlLICEls Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] skipping optional parameters From: colder@php.net (Etienne Kneuss) Hi, On Wed, Apr 18, 2012 at 01:56, Stas Malyshev wrote: > Hi! > >> Since func_num_args() won't be able to be used to see if an argument is set, could a func_isset_arg() be added? So something like: >> if(func_num_args() > 2) $value = func_get_arg(2); >> would become: >> if(func_isset_arg(2)) $value = func_get_arg(2); > > I think it's easier to just do func_get_args() and check for isset there > :) You usually don't have too many args so getting all of them is not a > big problem. > +1 BTW: the diffs show a lot of WS changes that you should probably fix. Best, > -- > 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 > -- Etienne Kneuss http://www.colder.ch