Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68954 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54469 invoked from network); 7 Sep 2013 18:05:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Sep 2013 18:05:55 -0000 Authentication-Results: pb1.pair.com header.from=simonsimcity@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=simonsimcity@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.174 as permitted sender) X-PHP-List-Original-Sender: simonsimcity@gmail.com X-Host-Fingerprint: 209.85.212.174 mail-wi0-f174.google.com Received: from [209.85.212.174] ([209.85.212.174:61569] helo=mail-wi0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 38/1F-00660-20B6B225 for ; Sat, 07 Sep 2013 14:05:55 -0400 Received: by mail-wi0-f174.google.com with SMTP id hj3so2029783wib.1 for ; Sat, 07 Sep 2013 11:05:52 -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 :cc:content-type; bh=zH4ns9Me7xcHl8it3kA3Wrf1EzZ1P8kkkCrqOdww/x8=; b=BzIbEAH08fG07g552aBPY9nX5GTgFzLrBx27c8UR6hyxTTC/AaHagg3FytIQYuYEYS qCymbCSh7zyfc4wYgwcdPKsUSL0w+pbGoLOryqDiflBJwhrO7QM/4lMcBUDEvzM+iw8l b2JKhSwiT+y6F3srebJlnqs136V098Wvflxkrg1MhJwPqzz/fK3DpFEDY7VXCmiP7fvV NRjOvnDFcVAatsmGS2YUCII7aZPGwvYwTfLcacSgNzphEEIgaUI9a+5nPtbWLcoR5lVT CVM4GZHOh8Fh+5Y5WGGBbEGDlTqk+F/y/UtppZshwTY7kFanx5BFSb6LL3P7bmQ9OjLw t5Bw== MIME-Version: 1.0 X-Received: by 10.194.123.227 with SMTP id md3mr6733918wjb.17.1378577152112; Sat, 07 Sep 2013 11:05:52 -0700 (PDT) Received: by 10.194.42.71 with HTTP; Sat, 7 Sep 2013 11:05:52 -0700 (PDT) In-Reply-To: References: <522AFA6A.8010501@mjburgess.co.uk> Date: Sat, 7 Sep 2013 20:05:52 +0200 Message-ID: To: Matthew Leverton Cc: Michael John Burgess , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Named parameters From: simonsimcity@gmail.com (Simon Schick) On Sat, Sep 7, 2013 at 6:55 PM, Matthew Leverton wrote: > > The OCD in me shudders to think about now having to parse through > people's code like: > > substr('length' => 1, 'string' => 'Hello World'); > Hi, Matthew Wouldn't this just fail, because one required parameter is omitted? You can just leave out parameters, that have a default-value. Otherwise it's treated like calling: substr('Hello World'); // Warning: substr() expects at least 2 parameters, 1 given in php shell code on line 1 I would return the same, even so the parameter-count is 2, but the 2nd parameter is missing, but required. Bye Simon