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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to