Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94871 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60742 invoked from network); 6 Aug 2016 02:26:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Aug 2016 02:26:27 -0000 Authentication-Results: pb1.pair.com header.from=me@daveyshafik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@daveyshafik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain daveyshafik.com from 209.85.216.178 cause and error) X-PHP-List-Original-Sender: me@daveyshafik.com X-Host-Fingerprint: 209.85.216.178 mail-qt0-f178.google.com Received: from [209.85.216.178] ([209.85.216.178:36370] helo=mail-qt0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/B2-33134-FCA45A75 for ; Fri, 05 Aug 2016 22:26:24 -0400 Received: by mail-qt0-f178.google.com with SMTP id 52so182426375qtq.3 for ; Fri, 05 Aug 2016 19:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daveyshafik-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=31OXvlIrSsMjBqMtjvJ/Fw0e7eOechVaYPH/UfoRk7c=; b=OTDyS35e1LEBf1PL3WV5YkZrT3YgLP+PynRZiBIRnofSj5rmUlLIm21gy4R1MUEI03 455YJ/iXBfJh4C63oZ+DxJ+04j1tgO1XmVODTfS8MlTrkhBDra08jJ0FBm3jpG1eS01v blJMLstbklkxv0xEex9orCBS24IgBFKi+O4Ps+SbCYCTYjsyNvHmhMcp13JenOrcxBa4 66l917XqQYjVjTFh91h5IesXsOpCh4aLELs1f/C6yaU5ckspTbMOJQi9YMTk8KqdOOb/ EyBa61T+g1V7HbjPGcHB7h0j9EHynRMl+xlcfXQ7B7bdHvtoniYN93z0jrZ2pNBzak/T gnHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=31OXvlIrSsMjBqMtjvJ/Fw0e7eOechVaYPH/UfoRk7c=; b=Z8oJ9/qYHPrAEV5ErrUZXxvSJ6+QPxT5Z2Pel/QvHsqyKZhis4IMIFtFm3+voXS37f 5JGaTEtdvfLjtCIWUgBYmbHdI922QpW8oq30lr8SGMvAdFm5vJ9Mj5Mt4MNq5JP7AMBj Kfd4/KkDUCelgTLOJmpeD6grGxMRqBcExULhFcEKFnBxauk+ZheKAr00zIbkvvdseqMU 1hc1ksgElCq0uWquLe348U10bw9x5XhV1QapNo/zodROQPgYsP9PzRCPydfNPuZDlLrm CE9gZoa7O+r9K7UnS31DtPsyhpNvLIS3eGlXu1Yj2DRDGDiW8AeKGbTyEuENAB4kejex 7mqg== X-Gm-Message-State: AEkoouuwGVYnwv0sx1JNYQcxom2LL6Ai7WjdyWBWnsGpftXRJwt8expBQvkmtdCrgV4UBl5aM39apMO/zr8DXcyD X-Received: by 10.200.49.129 with SMTP id h1mr16218336qte.103.1470450379940; Fri, 05 Aug 2016 19:26:19 -0700 (PDT) MIME-Version: 1.0 Sender: me@daveyshafik.com Received: by 10.237.55.138 with HTTP; Fri, 5 Aug 2016 19:26:19 -0700 (PDT) Date: Fri, 5 Aug 2016 19:26:19 -0700 X-Google-Sender-Auth: hNtz4pyftNxPgoj_EaZHiziqELg Message-ID: To: "internals@lists.php.net" , Dmitry Stogov Content-Type: multipart/alternative; boundary=001a11c003868e7d7405395de885 Subject: Change to Too Few Args Exception RFC From: davey@php.net (Davey Shafik) --001a11c003868e7d7405395de885 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 bad= : 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 --001a11c003868e7d7405395de885--