Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113377 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 65933 invoked from network); 4 Mar 2021 14:18:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Mar 2021 14:18:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 725F81804B8 for ; Thu, 4 Mar 2021 06:09:08 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 4 Mar 2021 06:09:07 -0800 (PST) Received: by mail-ed1-f42.google.com with SMTP id bd6so21764330edb.10 for ; Thu, 04 Mar 2021 06:09:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=DPi42YIvAc1a0XUdSPassCQu2tnHeI9Ed1hT7G9kmL0=; b=jHjxQwkUxh7cIz55OAA9p/DMWqJfpvdBIQuj0LsrMi/S8XBj4NPqPiCBjFsI91iuBB DWei93AtyKknWGF/xH6ETAWxcYfesNSc+s3qDtgA/0XUsUlRMhDcKkqlUEXnEFBH+xBH Bfer6Grru6XHwb54sCX1UttmwXqAztPqj7OzCoqJej++Aoym0TBv2BbP+3iJzb8pxZ6G xm0R0gnWLXIdPxZvw4wjpVnDd7UYgdFQ1QOCFZQEYW58if6DR9EPgIVXkoSPiUXuIVDP LhKhB0I6BMraUx/n9mCGrPNXmgRQVJb4EBHTizlJr3r4W+jHCXEHwiYLo2F1vcSUHziP dBlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DPi42YIvAc1a0XUdSPassCQu2tnHeI9Ed1hT7G9kmL0=; b=O7XMmFBL8Wwo8EqVHKH+ilBwomHAG3n2lZEg0slYkACqO9aOfM5bVNes927CY+y8xt Nr0faVFxdGviRqnjl1HbO4Z/DflhHa2a1Bm7BHn0Gcd6asPAShZWyZnbmQm+wAmcbTMl G9/YQ9/0IBg3Yf+2AUkNoi2w3VsxHdykIbxuvgKpxNmzeC/aPtrmjYgczOwjUtOvsWDW eF6D7HOPEjQ4Ggh67fSgQRuET+W2CKNnTqlm5uXgPv4+YSsQjDFaB5W2Bf+VhsZN7726 ZLh9kVcW7xr/crrWrdTM/bwklw4ujTcQVsBmMvDEQEX7inf0eBqIq6hqmm+8CFGCYs55 8Jbw== X-Gm-Message-State: AOAM532sjk/WGs6yB+nEmTKO0RA6Fwq1w71544Esh8LYMin28hjKebUC LGPnfSXsYkYXByjPEO4S9M3aXMuYGoPG2TcKzz/ZbXEx6Qc= X-Google-Smtp-Source: ABdhPJzdyfd+ArPmyi0ObHKIW0QE2zdnhJTYCxFlnbUVGqXCnXSnydceHwLY3TaAyZpR+wZTIYvud8uOgmSGhmmPG+I= X-Received: by 2002:a05:6402:3049:: with SMTP id bu9mr4633184edb.104.1614866946362; Thu, 04 Mar 2021 06:09:06 -0800 (PST) MIME-Version: 1.0 Date: Thu, 4 Mar 2021 14:08:55 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000b28f0405bcb682c2" Subject: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions From: george.banyard@gmail.com ("G. P. B.") --000000000000b28f0405bcb682c2 Content-Type: text/plain; charset="UTF-8" Hello internals, This new RFC which I'm proposing is to extend the capability of the error control operator @ to not just suppress diagnostic messages but also exceptions. It can currently be found on GitHub: [1] https://github.com/Girgias/error-control-operator-exceptions-rfc The main motivation for this is to provide a path to migrate in a backwards compatible manner away from diagnostics such as E_WARNING to the use of exceptions without breaking 99% of PHP code which has been written in the last 25years. This proposal on it's own would not be sufficient to trigger such a change for extensions but in combination with another proposal to introduce a `throw_on_error` declare [2] it could provide a bridge for a gradual transition to the use of more exceptions internally. Although I'm not thrilled with the idea of shoving more functionality into @ I don't see any other way, and thus I think it a necessary evil to improve the long term health of the PHP project. Feedback on this RFC and different ideas on how to tackle this topic are highly appreciated and welcomed. Best regards, George P. Banyard [1] https://github.com/Girgias/error-control-operator-exceptions-rfc [2] Draft RFC for throw_on_error declare https://github.com/Girgias/php-rfc-throw-on-error-declare --000000000000b28f0405bcb682c2--