Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94875 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78410 invoked from network); 6 Aug 2016 07:33:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2016 07:33:09 -0000 Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.217.171 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.217.171 mail-ua0-f171.google.com Received: from [209.85.217.171] ([209.85.217.171:34357] helo=mail-ua0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1A/E4-33134-4B295A75 for ; Sat, 06 Aug 2016 03:33:09 -0400 Received: by mail-ua0-f171.google.com with SMTP id 35so212819615uap.1 for ; Sat, 06 Aug 2016 00:33:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JFMTK4K1HHGI6e8HaM6AiET4sDI0g/7LGMFZ9rCFhg4=; b=tiV56ExHs3a4AeKUUqE0BpYevZgFwZIex801r98nMZD5aFfrp+fqrAdOH6SRorPwnM nqkQqzS0/hpYaB7cO83X3KFhZSoj7agkc+TFO7AqEnUoWtEVLc6W9YkJ5zeSji12bcyR TRVzAeTJ5nZGPuoFEQoZ5VdcItouACGfAnfwwrR3UbPkr+98eqxQ0uGABlNDFV9N4L4u +PvlkVkzbSo7DghJgQQgVMBJwK84bSWjMg37JhhOHCQrGRMuz637vlYbxt4Thp0++q5P tzjRRQRNpXbwE6NqbnlBSoECbkm3YpJQegfPWNKdsjHq3OdYQku/AKypLVoaRaTwOco5 OQZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JFMTK4K1HHGI6e8HaM6AiET4sDI0g/7LGMFZ9rCFhg4=; b=G0A1A7uXcmXq07TGUOYJjHkL8RV+iGzgHm6o9/RsxcJVN+ZHkyRXHoLdGgCKW+WbUl W4GXs4/CvYtfiJ+IgweukxCQO9BRAa9w+CkgS9WtinvmmOX1VIES1m4DljZbsEOvHbCz n/Seqg1wctd1SSTBYj9uR/Tc4o0nJ/shdlXFcx/VkAVer6LSf7gbT2KqqVhblcPKiFrY 6hQjaPMT3XYO8LEkAhNhxE1PL22MuMC4M8bQXYtjp7Rn61PWqQ1iEAd8JUhc2yEz3sl/ 4fd+Jrec3dvf4mNfznJGQcZK+/XKAFMMd61HFh9hbR2TEg6bzc+iSnq/0KK5jEp2Ftvs b5Dg== X-Gm-Message-State: AEkooutkGKlnnw8TVrnpulLsQkRER4qiL6J27E6FzdHjSyBOjYTPBKS7SiJJnh0JwGTdygOv8J7HQ1+C0zpLvA== X-Received: by 10.176.80.200 with SMTP id d8mr12864586uaa.90.1470468786281; Sat, 06 Aug 2016 00:33:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.39.132 with HTTP; Sat, 6 Aug 2016 00:33:05 -0700 (PDT) X-Originating-IP: [109.157.60.58] In-Reply-To: <01e3ed40-cf40-4a0e-aa03-0e4326257d7c@email.android.com> References: <01e3ed40-cf40-4a0e-aa03-0e4326257d7c@email.android.com> Date: Sat, 6 Aug 2016 08:33:05 +0100 Message-ID: To: Dmitry Stogov Cc: "davey@php.net" , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=94eb2c1911daa8f6ff053962312a Subject: Re: [PHP-DEV] Re: Change to Too Few Args Exception RFC From: pthreads@pthreads.org (Joe Watkins) --94eb2c1911daa8f6ff053962312a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Morning all, Good idea, +1 for just doing it ... Cheers Joe On Sat, Aug 6, 2016 at 8:18 AM, Dmitry Stogov wrote: > I don't see a big problem accepting this. The change is really minor, and > makes sense. > > Dmitry. > > On Aug 6, 2016 5:26 AM, Davey Shafik wrote: > Hey all, > > I know this is a little late in the process, but it's something I've > noticed while prepping some content around 7.1. > > This RFC: https://wiki.php.net/rfc/too_few_args > > Passed, and has been implemented, but I feel that throwing an `\Error` > exception is a mistake. I think we should another more concrete exception > class for this error: > > `\TooFewArgumentsError extends \Error` > > A use case where this may trivially occur is where you are using argument > unpacking and the unpacked array is too small. Writing this, just looks b= ad: > > try { > foo(=E2=80=A6 $args); > } catch (\Error $e) { } > > compared: > > try { > foo(=E2=80=A6 $args); > } catch (\TooFewArgumentsError $e) { } > > Thoughts? Dmitry? > > Given the tiny change this is, and that is backwards compatible with the > original RFC, I would like to add this to 7.1 for beta3. > > I think I can make this change myself. > > - Davey > > > > --94eb2c1911daa8f6ff053962312a--