Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110272 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7764 invoked from network); 25 May 2020 00:49:11 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 May 2020 00:49:11 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 748BA180211 for ; Sun, 24 May 2020 16:28:58 -0700 (PDT) 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, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (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 ; Sun, 24 May 2020 16:28:57 -0700 (PDT) Received: by mail-wr1-f53.google.com with SMTP id h17so15513163wrc.8 for ; Sun, 24 May 2020 16:28:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=EdF80euZJ+pnnVcaaBN0++XghgXInnlxOFGf9PKBMTk=; b=kl009K2NcLkU5qkmwS4HPv7NNQuSF1yLJASDkmiBJUUTqx7OYKUVcEii2/9hJCgvgX ebS3BAU2ivt26g3P7N2URFpk/wWWioJ7ElWutQhDk2Bhji7iqeqGIYPHtxiSqkN/VbCV 6nmgljOx/iqzqkY+pOVAbpze3xyW0uMVdN+92xoOMMVRi3Lp9T+V4+aAgpQU1Kl745Qg 4Em8Qbobg+A/q0U8vz2ooSorLSXtEXTvR10U0WPuEhhjfCbDxGysM9iO1qUKAdN63xNK AfkORgkwahn3U6mH6oKZghO2KvQ9cRCMM8XKoXAG5feAC7vkG9hKHVO7De2r1XPSVLOx KiCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=EdF80euZJ+pnnVcaaBN0++XghgXInnlxOFGf9PKBMTk=; b=nxIuSDeII8VTRuM80Rbgj37BXCZGqVEgqZ5iVxnU4CjMszm83JCWqcMWRzJKeOz+xX AObzZ8cq/dVIYZnZzeX9KsWCJRC3/LwS1/AhHoHOgb2tzk3GNy7tZuhEQqaoejzUBQay n85sHHVc4gwmubxo99UXdopqb7lDhJVOc91ZKzavz7SXa3omScilJ5tdLUHtXcUpPHNv UAW3zQ/GnCBxlQ53mIrWv+clBbZ2FGhKAZp74pYp8glb+rChuyy2NMR6v/RlgzUAKULP 15LKpAwaDA1pMkh0Xo0Ou6oMHJjaW/4F62cb2SjtmSbSJLDazMqX9mnRz6WVRvUHpFOd GCNw== X-Gm-Message-State: AOAM5308eXyMwpOj3eOKz4IrRTnmcLdzXX3atX0DALWOwBA0QJ2Ockde DcftrAyUPTjdYLkFi92n3XXkIz1Z X-Google-Smtp-Source: ABdhPJyjTjjkKxlLS3Q3SSqHnZYx7W592PuFw4BT7XYGzZicortsgDveRBMTlgj0dzmxRfhjZNDELA== X-Received: by 2002:a5d:4488:: with SMTP id j8mr5612572wrq.242.1590362929549; Sun, 24 May 2020 16:28:49 -0700 (PDT) Received: from [192.168.0.14] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115]) by smtp.googlemail.com with ESMTPSA id f123sm16495054wmf.44.2020.05.24.16.28.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 May 2020 16:28:48 -0700 (PDT) To: internals@lists.php.net References: <0819e254-c789-e3d6-b23d-08128f195953@gmail.com> Message-ID: Date: Mon, 25 May 2020 00:28:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode From: rowan.collins@gmail.com (Rowan Tommins) On 24/05/2020 22:07, Katie Volz wrote: > I hadn't thought putting the error types in the declare(). My only issue > with that is how that would interact with the error_reporting setting - for > example if I set my error_reporting to E_WARNING and error_exceptions to > E_ALL I'm not sure whether a notice would be thrown. In my mind error_reporting should make absolutely no difference. As you say, this option would be for people who don't want to interact with the current error system in any way, and that includes its global configuration state. For instance, imagine you wrote this: declare(error_exceptions=E_WARNING); $fh = fopen($filePath, 'r'); // code using $fh The point of using the declare here would be to avoid checking if $fh is false, since any errors opening the file would become exceptions. If error_reporting(0) can turn off that exception, you'll have to check for false anyway, defeating the purpose. Regards, -- Rowan Tommins (né Collins) [IMSoP]