Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112371 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7992 invoked from network); 2 Dec 2020 14:28:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Dec 2020 14:28:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 293D51804C3 for ; Wed, 2 Dec 2020 05:56:11 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (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 ; Wed, 2 Dec 2020 05:56:10 -0800 (PST) Received: by mail-oo1-f48.google.com with SMTP id z13so372414ooa.5 for ; Wed, 02 Dec 2020 05:56:10 -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=11bF+jZeHeo9XqQrundHExXWSyIMh7P8iEBp/QgwzFM=; b=uscpQnBBv0gFW13QidMNfGj+qdh6j7k6OzrS6hN4LP8uGNNTatnEDQGF+EONOewcNB OCzELdqTkxoxyGpY/k3HYA8uKsMmHpTVcTTDxUW+x+53MCyUB0y3+bhraZ+MQ/7Feiv6 k34pOfMSWtk0iytxxzvB/GesOhP3w+VINoX2Zy7Ee2uSYriLb4F7fbjntpSMsfon6nV9 WNZG4rw8u28VJLKSnA/qIee6pFQImrJzZ5ptsTySNkgyWfc9y4BmGKuwwZPqTkXPwJ/s y7vYRqO4YkTviiXDg2oaCXKP+hce8ruiZf9JvNnB88BdpVkpon83BDE3pyUn6e0UteMb Gs9w== 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=11bF+jZeHeo9XqQrundHExXWSyIMh7P8iEBp/QgwzFM=; b=bktfddA0qFSXe/R7Y1EY6QUwHxeMCwYTe/VRW+HQ4pA8MX9e26Al+61D4022fIMTr6 EgjuMmmHOX+WCizI596GpRaa0ySFG2WoV9MMK4u8GmnrqNE9bR/4VUExxpXrs5qrBzp8 gmAZX2b4gGxY+3bqpJ/fYLCEQ3wbG7zbZ6QWA6TKaIW5tbY7zxThrR5QNAJCmD9UHh9r jTKKy5GecATaOtUgJxb+2tz0lapWWrrvKxRcee+RrIReF0juCHwy0tAyWl7TvppRfOLZ 7udLM1da2+FUoMWmX2h+RdzdViwiAxtHk8ELi8kwthLSK8jsly4KU4b5/cvOyH3eCDxH Xx8Q== X-Gm-Message-State: AOAM5326ECf8rh4vWW5Gvdq70kb1FZN1YBbdE/OX9fpCYSbC31jEkVva oRGMNwJKJPD0w2LsyXOaHk4hXhn6mAsRz58bMgV6vA2e5EB8Ew== X-Google-Smtp-Source: ABdhPJzlEKcJoU9ffEwZyHDE5SsiMUqEDL9XOdU3HNdW8EZZgnCdQI5hTNtXn1mW0z34Ci7ufV0yN2JB7mKLIds5w6w= X-Received: by 2002:a4a:88c4:: with SMTP id q4mr1767157ooh.20.1606917368088; Wed, 02 Dec 2020 05:56:08 -0800 (PST) MIME-Version: 1.0 Date: Wed, 2 Dec 2020 14:55:57 +0100 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="000000000000e88c7105b57b9a2c" Subject: erorr_reporting() and @ operator From: benjamin.morel@gmail.com (Benjamin Morel) --000000000000e88c7105b57b9a2c Content-Type: text/plain; charset="UTF-8" Hi internals, Since PHP 8.0, `error_reporting()` started returning a non-zero value when the @ silence operator is used. Demo: https://3v4l.org/CovYv Is this intentional? This breaks scripts that converted all errors to exceptions, except those where the silence operator was used: set_error_handler(function ($severity, $message, $file, $line) { if (error_reporting() === 0) { return; } throw new ErrorException($message, 0, $severity, $file, $line); }); Thank you, Benjamin --000000000000e88c7105b57b9a2c--