Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60179 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42873 invoked from network); 18 Apr 2012 10:39:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2012 10:39:28 -0000 Authentication-Results: pb1.pair.com header.from=admacedo@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=admacedo@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.170 as permitted sender) X-PHP-List-Original-Sender: admacedo@gmail.com X-Host-Fingerprint: 209.85.160.170 mail-gy0-f170.google.com Received: from [209.85.160.170] ([209.85.160.170:62267] helo=mail-gy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/67-03614-FD99E8F4 for ; Wed, 18 Apr 2012 06:39:28 -0400 Received: by ghbg2 with SMTP id g2so3997267ghb.29 for ; Wed, 18 Apr 2012 03:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=D1bREcAMh0CVfDAhvuPFJ2ManskJ6A0XYT3rGB9Iybg=; b=GeHG+zfPaPS06S/1TL3YqEauY839ASF4WAkTRsg2IopDzVk81/3ciHiefKOGGxNlKB 6ZDN6RuCHYKIv5+6/+Mj5WMyr8vi2+gPDKbiWgM8yjrORIy9jO+UP1cHydFs6kfrgRFM liewNXTEtm77xzCpX3tvNwxJ1pi8g4B0uo7vamA7rkqJrfOOjV18h5LsUeDInOTqMFuS JhiDdbaiy/H4AIKXVj0hgsFaW28eGwRYbGkOCmRN/BaNF6KpGo7kXAffezMb/1MRJ59b Ozr19Aj5yXiVp1Hp1l+Zq8u69tMcuC3pAF1u1nw7jEvWfOGWBYWdnCMns/d8H0xnPMqu 5XBQ== Received: by 10.101.134.40 with SMTP id l40mr487776ann.33.1334745565442; Wed, 18 Apr 2012 03:39:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.46.130 with HTTP; Wed, 18 Apr 2012 03:38:45 -0700 (PDT) In-Reply-To: References: <4F8DF4B1.2040307@sugarcrm.com> Date: Wed, 18 Apr 2012 11:38:45 +0100 Message-ID: To: Peter Cowburn Cc: Adam Jon Richardson , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] skipping optional parameters From: admacedo@gmail.com (Daniel Macedo) You can't do that, NULL is a perfectly acceptable value to pass into a function, you wouldn't be able to know when you wanted to pass NULL or use the default value, e.g.: function fn1($a =3D false, $b =3D nul, $c =3D 1) { var_dump($a, $b. $c); } // your idea fn1(NULL, NULL, 10), // NULL, NULL, 10 // vs. using a reserved word fn1(default, default, 10), // FALSE, NULL, 10 Cheers, On Wed, Apr 18, 2012 at 11:21, Peter Cowburn wrote= : > On 18 April 2012 10:25, Daniel Macedo wrote: >> >> But I couldn't support the comma train, for the insane =ABlots of >> parameters=BB case, would hate to read some fn($some,,,, $var,,, $other) >> call. >> I'd rather reuse a reserved word like 'default' (or even get a shorter >> one?) >> > > How about "null"? (Tongue firmly in cheek)