Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60139 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52230 invoked from network); 17 Apr 2012 23:56:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2012 23:56:58 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.123 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.123 smtp123.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.123] ([67.192.241.123:52384] helo=smtp123.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/CD-21594-A430E8F4 for ; Tue, 17 Apr 2012 19:56:58 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 3107C7816F; Tue, 17 Apr 2012 19:56:56 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp2.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id E18C778168; Tue, 17 Apr 2012 19:56:55 -0400 (EDT) Message-ID: <4F8E0347.9080609@sugarcrm.com> Date: Tue, 17 Apr 2012 16:56:55 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Simon J Welsh CC: PHP Internals References: <4F8DF4B1.2040307@sugarcrm.com> <0CBF8A52-E369-4F31-9415-43126FA03904@welsh.co.nz> In-Reply-To: <0CBF8A52-E369-4F31-9415-43126FA03904@welsh.co.nz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] skipping optional parameters From: smalyshev@sugarcrm.com (Stas Malyshev) 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. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227