Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103301 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80057 invoked from network); 3 Oct 2018 01:27:51 -0000 Received: from unknown (HELO mail-wr1-f47.google.com) (209.85.221.47) by pb1.pair.com with SMTP; 3 Oct 2018 01:27:51 -0000 Received: by mail-wr1-f47.google.com with SMTP id u12-v6so3837508wrr.4 for ; Tue, 02 Oct 2018 14:37:34 -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=R9nbjDOyyKjFzRPGdcc0AZ9kGiZvR+6hIdnv5SwqYAU=; b=Bur13TnkOyBdYkr9AtnoxGpa/c412YkOKnqQRR9SVZGhZb3tEpZ0WNpiidaJgrD2/s lHZwB4/9HvEyRRVKpu5zJCwiL6XJld4RACX0g8wEMIYul4yzD8vEbdMN/nc46/ZJ3WbJ Rop5CDyWI5uQiBoTJSkYgkP/cRxZZOdMGz1CMH3GTRQdtLW2EN361KlszD8KsaVFNClA tU82nimhdurxoMjWRQoYu74rCU7EDJLiyhM9Y6HSl2BtCfcew8uIh+Mt0b3nyD1b2N7z i2AGPz5vdksB3N+sCtOQ7OhJLanvfxHYJkkLYkVRPWAVvKcv2WLugVJ38xOnP2LJLGbm zFMQ== 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=R9nbjDOyyKjFzRPGdcc0AZ9kGiZvR+6hIdnv5SwqYAU=; b=QdklSpLYhpeQd0z6dxRJ3lTPT5rK4U08gMWfS0WgRpIE1pug9bA0ephHY/8zHgcGqf 4aNDxQM7hiKVRXF+58nOiNiceefAvwRTe6J6cGUDFWSfr6mAzMey3VeVe28SgjCQvnBa URT0hCmvblkaTGniSZHeBZvGuLK9an4WdJpcqmxK4KPvmZaVd3gkOipeeLnlk3eDnXz0 wolm59UjBh/xChdGPW4O8otJ4XnTQww+jyjI0QAsSHVKHmk8uyI7kJFENgAaQZPJrTte NaHUyw4Bnc0bHTIzzof2gMXvkWdyBBobr1xPVNj7qC0+hH+CgGwST4fKem99ijAeR55D NKjg== X-Gm-Message-State: ABuFfojhPIhu93L1sZM163ZKL1T+wxcP0vzmP3mWhiEEaN/imhImOshs u2IArSnOzhYXhQVjY7OMxV0vW5ME X-Google-Smtp-Source: ACcGV63u+0i7CmXaG/SiKJ6c+vmy1lhfcwjVg2QwZEl2j8pxp7t9qJCw2WYjm67CeaLvANXRuNwbLw== X-Received: by 2002:a5d:468d:: with SMTP id u13-v6mr5976180wrq.263.1538516253894; Tue, 02 Oct 2018 14:37:33 -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 b139-v6sm23508717wmd.36.2018.10.02.14.37.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 14:37:33 -0700 (PDT) To: internals@lists.php.net References: Message-ID: Date: Tue, 2 Oct 2018 22:37:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] deprecation of set_error_level() callback $errcontext argument From: rowan.collins@gmail.com (Rowan Collins) On 02/10/2018 15:57, Rasmus Schultz wrote: > I understand the $errcontext argument to the set_error_level() > callback was deprecated in 7.2. > > Apparently, this was deemed "not useful", but what's the alternative? Digging into the archives, and the RFC [1], there was a bit more to it than "not useful"; capturing all variables in a local scope and making them available somewhere else is problematic when it comes to optimisation and analysis. This is particularly true since PHP has no way of making this data immutable, so any error can theoretically cause any local object to change state without being mentioned. While I can understand the desire to have debugging feature built into the language "out of the box", it may be best left to extensions which can capture the information to a log or wherever without providing the full flexibility of the language to interact with it. [1] https://wiki.php.net/rfc/deprecations_php_7_2#errcontext_argument_of_error_handler Regards, -- Rowan Collins [IMSoP]