Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101837 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23942 invoked from network); 12 Feb 2018 10:03:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Feb 2018 10:03:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lsces.co.uk designates 185.153.204.214 as permitted sender) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 185.153.204.214 mail4-2.serversure.net Linux 2.6 Received: from [185.153.204.214] ([185.153.204.214:38058] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/7B-18020-686618A5 for ; Mon, 12 Feb 2018 05:03:51 -0500 Received: (qmail 7234 invoked by uid 89); 12 Feb 2018 10:03:47 -0000 Received: by simscan 1.3.1 ppid: 7226, pid: 7231, t: 0.0885s scanners: attach: 1.3.1 clamav: 0.96/m:52/d:10677 Received: from unknown (HELO ?10.0.0.7?) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 12 Feb 2018 10:03:47 -0000 To: internals@lists.php.net References: <2d34448e-f3da-16c4-781e-b308fae2302d@cubiclesoft.com> Message-ID: <326cd3ad-482f-ec5e-17f9-afede33ae9e5@lsces.co.uk> Date: Mon, 12 Feb 2018 10:03:47 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <2d34448e-f3da-16c4-781e-b308fae2302d@cubiclesoft.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Subject: Tidying out of context errors From: lester@lsces.co.uk (Lester Caine) On 12/02/18 06:19, Thomas Hruska wrote: > On 2/11/2018 9:45 PM, Michael Morris wrote: >> If we are going to go about removing stupid operators in PHP, the current >> use of @ as an error suppression operator is much higher on the list >> since >> encourages people to write bad code by sweeping problems under the rug > Or people don't like how PHP currently handles errors/warnings/notices > and would prefer to handle the messages themselves in the same context > of the running code (i.e. not in a global handler).  I'd rather see the > @ operator become a "most recent" message collector instead of purely an > error suppressor.  That way, the current behavior wouldn't change for > existing applications but users could start taking advantage of whatever > associated functionality is added. > > There are also significant security issues that arise when NOT using the > @ operator. This is another decisive area of PHP. YES I am still using @ to prevent PHP wandering off on it's own, so I can properly handle things like 'end of file', so I don't want the global error. Much of the push for typing everything is pushing global errors when local path changes WITHIN the class is much more appropriate. The 'most recent' error is how most database error processing is handled, and in most cases the error suppressed by @ is simply taking PHP out of line. Switches to disable global messages are now in something of a mess and adding more and more sources is of little help to the vast majority of users. backtick probably comes into the style class and with people Python for on machine script handling nowadays then removing access to the machine for PHP scripts just seems another push that way? Just what target area IS PHP supporting? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk