Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112373 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11662 invoked from network); 2 Dec 2020 14:46:31 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Dec 2020 14:46:31 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E3ABD1804C3 for ; Wed, 2 Dec 2020 06:14:12 -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_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-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (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 06:14:12 -0800 (PST) Received: by mail-oi1-f174.google.com with SMTP id y74so1654202oia.11 for ; Wed, 02 Dec 2020 06:14:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XAtL8RMImiWT64nJjw/oe9rHaC7Ayhzc1aBZ8fT8K1M=; b=eEUPTq3PeREl8U3xBYfuWojlBZ3zoNAjCeKhtPvsfoAlEADQH++zc8kxrMetKkdMYI RDvldM8oYSa7ozr4Tfz97VlVsk1H8RZWfoO3PDmHGI96G6haq+ppEwr6IfuWqYYLi1Pp rXhReUXr9jAFSnX0YonZYGOf43T6U2PP41DoFjGubVhc73qBGnsIv5rsp7lBfEGTXmeV 1gkK+seED7fXjWixgKTh3TrHQJMCjJtx6IBsMy2nL1Ng97J4n4dmWCD7fzJJyqvfwKIJ sIDefcPYecEnlUwPcgxwOmk/U+K0tfLirU+OJEdhOvICEsxVfQNqhZPd+e8wT7ai1Ta7 XxKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XAtL8RMImiWT64nJjw/oe9rHaC7Ayhzc1aBZ8fT8K1M=; b=s+TwXe48Sso/tby0iFqLgpvvthUqvPgMs97P9rllTXhwW48wT30L7nt63f7y5RNbq5 9VDumxeekAKMpiPk6rD1kiJ8ja4/f7ytuTQMjc09FXuTsU5iRl2wNe4hMkCB7JGULB+0 Jc0SBtHogV4x0ESa2qwLKPjQUuK/tgLbzkt5uvxz4hQcI7RmQ9n0kSSPCEuKAtxA6Lum ZMvNu1JzVK32iIGckcIfLOFQgGz9d5iN9Hc7TQ5RmmrnQ6an3JQBtuOB/fb6oVxO68cG u5UTyg0O5lTithUgEOqwGxmcu5yonT75FvHrJ7iNPLQ4IwtZRxIuC9XnYD/QtGoqRoJC PXuA== X-Gm-Message-State: AOAM532yRiC0bS+rvccCZQ2cPSzVDt9gtdXFVGsyG/DFHDjSymg7PhXp jNahbFaB5VyQXWPymmpEtb2Epf8Eyb9o0/58puk= X-Google-Smtp-Source: ABdhPJwB5RVBQkz1yNVB6ZwzQ+AmG/RMc/BePbviknMeLwJfYlE0twKDJuG880XMsh4y9LwxV02tebUZdv4lVwEZzDY= X-Received: by 2002:aca:d696:: with SMTP id n144mr1652099oig.77.1606918450327; Wed, 02 Dec 2020 06:14:10 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 2 Dec 2020 15:13:59 +0100 Message-ID: To: Nikita Popov Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000006a380c05b57bdbd9" Subject: Re: [PHP-DEV] erorr_reporting() and @ operator From: benjamin.morel@gmail.com (Benjamin Morel) --0000000000006a380c05b57bdbd9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the pointer, Nikita. I think the updated example (using `error_reporting() & $errno`) fails to mimic exactly what `error_reporting() =3D=3D=3D 0` did, though. Say your php.ini mutes E_WARNING, for example: error_reporting =3D E_ALL & ~E_WARNING Checking for `error_reporting() =3D=3D=3D 0` allowed to only ignore @-suppr= essed statements, but still throw an exception on E_WARNING, ignoring the error_reporting set in php.ini. OTOH, checking for `error_reporting() & $errno` still allows to ignore @-suppressed statements, but **also ignores E_WARNING configured in php.ini**, which is not always what userland code wants. I'm not sure how userland code can now replicate the old behaviour, i.e. specifically detect the @ operator? =E2=80=94 Benjamin --0000000000006a380c05b57bdbd9--