Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89939 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2856 invoked from network); 31 Dec 2015 15:00:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Dec 2015 15:00:27 -0000 Received: from [127.0.0.1] ([127.0.0.1:13322]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 35/9C-51216-A0345865 for ; Thu, 31 Dec 2015 10:00:26 -0500 Authentication-Results: pb1.pair.com smtp.mail=mjsa@junade.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mjsa@junade.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain junade.com from 74.125.82.53 cause and error) X-PHP-List-Original-Sender: mjsa@junade.com X-Host-Fingerprint: 74.125.82.53 mail-wm0-f53.google.com Received: from [74.125.82.53] ([74.125.82.53:37654] helo=mail-wm0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/8C-51216-D4145865 for ; Thu, 31 Dec 2015 09:53:02 -0500 Received: by mail-wm0-f53.google.com with SMTP id f206so113894601wmf.0 for ; Thu, 31 Dec 2015 06:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=junade-com.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to:content-type; bh=jy24MVS8N++XqMirHfUihu00+XKwKZsTAdLWua4KWCA=; b=ZJdFx44bOitqplt8oJyenaM59eRIt2OkBKbuOmVOldmKj94njYiVrkWdEPa52J6q5V wYP99NbwC0dUcF3arnpFPzJ3uVq+ZkApatSXRqKlemC4CJmgw25sbnhWk2X/IWpv4Jz2 1iWimBJong/EZTC7CAykDiT2NpM7rRGYMI12kxp502mVrGA4TIKX1kAf/9khONCo42ln CZKiXlgC5JookObLOefr4HdcopPIXeZts9n1QA6dIrG3BsnAEda6tuAidLY29EsawgxQ +oPPTiB28+QB01qdkvDrvZUagJthCAjRNxRWXodNp2x9883zGiLppa3Kmtm5Cjw7tqdD TsSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=jy24MVS8N++XqMirHfUihu00+XKwKZsTAdLWua4KWCA=; b=N/hVITl+4aOjez98qSoL6MiYXSGXq2YPfVNpk5/4B5fLRLSF+Vn4WzO3EOR2+UAUrz 5NpBgNIbniVSByEZEFpMc6i61vWWmxAqmRVTiTvnq+e51vfQItD8egFvw2YSopQOBTum WEHq4YIHkJ9REbDRj8A3HcvSfEW96KPl3GwxrNQEq7+eGlt1HdQXBU5P37/XDNWxNNO1 Fm0+XhtKzcwedZGr0zK5uy/UYfwWZXhl1SRU0++PZspP1DikgXhRTtXtlwr1QVOKICoK AQShGRh9n+Bx+cu+mnENWA5tEeijr8xhZKMf+jfIjyI90iQzlV5aRrzKCwuNDSBwxwk+ P+Fw== X-Gm-Message-State: ALoCoQnp8FloCnMuIjOmU/4W9YgSOuXLINoe4Gcl6FN10NkyPh8FCl6+6LC+2tOZ9+qEOHKNzSaZvFaooupc8O6C307BNK9EkA== MIME-Version: 1.0 X-Received: by 10.28.12.140 with SMTP id 134mr32081853wmm.21.1451573578888; Thu, 31 Dec 2015 06:52:58 -0800 (PST) Received: by 10.194.205.138 with HTTP; Thu, 31 Dec 2015 06:52:58 -0800 (PST) X-Originating-IP: [2001:8b0:cbfe:7271:88a6:6684:7bff:b1c1] Date: Thu, 31 Dec 2015 14:52:58 +0000 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a11444e3c891610052832cfd6 Subject: Deprecation of the Error Control Operator (@ symbol) From: mjsa@junade.com (Junade Ali) --001a11444e3c891610052832cfd6 Content-Type: text/plain; charset=UTF-8 Hi all; I am looking to submit an RFC in order to remove the error suppression operator in PHP, namely the @ symbol. I am happy to implement this, although it is merely a concept so far. My reasons for looking to do this are: - the error suppression operator leads to developers being lazy about wrapping things in issets, try/catch blocks or not handling errors correctly - this leads to painful debugging for developers working on projects with high technical debt - it's slow (though admittedly not that much slower) - careless error suppression can be reduced by forcing developers to learn about how to properly handle errors - when the @ symbol is used to prepend database queries, when there is a genuine error, it can cause the rest of the script to run successfully causing data integrity issues. If developers were forced to handle errors correctly this would be less of an issue. - lastly, this operator can lead to scripts dying due to a fatal error without any explanation of why, leading to painful debugging; all because a developer was too lazy to wrap a variable in an isset. Aside from doing this, there are a number of alternatives: re-engineering the behaviour of the error suppression operator and potentially bringing into the scope of a function (e.g. silence()); this said, I still feel this would contain similar issues as it wouldn't address the underlying issues of lazy error suppression. Lastly, I recognise this will be a big change to PHP; but I feel it is necessary to enhance the quality of PHP error handling. Let's not forget that PHP managed to successfully deprecate the MySQL library. Looking forward to hearing your thoughts. Thanks --001a11444e3c891610052832cfd6--