Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89947 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25835 invoked from network); 31 Dec 2015 21:48:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Dec 2015 21:48:47 -0000 Authentication-Results: pb1.pair.com header.from=bishop.bettini@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bishop.bettini@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: bishop.bettini@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-wm0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:35032] helo=mail-wm0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/DF-51216-EB2A5865 for ; Thu, 31 Dec 2015 16:48:46 -0500 Received: by mail-wm0-f54.google.com with SMTP id f206so72198729wmf.0 for ; Thu, 31 Dec 2015 13:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=HjxWHF9mEPAs9aZdJfCAke+6eGq4OME0EWMsuzXkthI=; b=rt/zn6Ab10rzsUcQJY8bz8y/dp+jGGoqFrVZ/paGkArQomjWmhE7hijXzCl4K179fd vuaFj0ADI3fGyeJ5obr7m1WRzV8eFhVkr76IUxOgx0azXXSQEvgDkKk4IWQfVr1PHihN V0wIglkcsBSNzNXheCvX7Q645j6UzVxR0dOha3s+WVK1NGEUho+VfwVHpnE1VG701jwI uau1yEOpHzPmnqens1KZ/OHBYUOh2pOA9px5O+VHlzT0msjMNcUHHIGiTrM/dff2QCTI nt1fKUsP3qnJdwuMy4J/crRztYTE/+A9xz92Ge7qx/QCf/WVKFiSW8jSU146G9MBNlnq T/Wg== X-Received: by 10.28.133.8 with SMTP id h8mr80864939wmd.71.1451598523275; Thu, 31 Dec 2015 13:48:43 -0800 (PST) MIME-Version: 1.0 Reply-To: bishop@php.net Sender: bishop.bettini@gmail.com Received: by 10.194.45.230 with HTTP; Thu, 31 Dec 2015 13:48:13 -0800 (PST) In-Reply-To: <568599AA.4090209@gmail.com> References: <568599AA.4090209@gmail.com> Date: Thu, 31 Dec 2015 16:48:13 -0500 X-Google-Sender-Auth: bdkZt0tO5LVI8pg7pLqzzgOg9oo Message-ID: To: Stanislav Malyshev , Junade Ali Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11432ede561f750528389e9b Subject: Re: [PHP-DEV] Deprecation of the Error Control Operator (@ symbol) From: bishop@php.net (Bishop Bettini) --001a11432ede561f750528389e9b Content-Type: text/plain; charset=UTF-8 On Thu, Dec 31, 2015 at 4:10 PM, Stanislav Malyshev wrote: > > The inherent problem is that some error reporting is unneeded in some > contexts, while welcome in others. That's the problem that needs > solving, the syntax is secondary to it. > That hits the nail on the head. When triggered errors are unneeded, @ works beautifully. When they're needed, use a helper like from my third-party library to capture them: use Haldayne\Fox\CaptureErrors; $copy = new CaptureErrors(function ($a, $b) { return copy($a, $b); }); $okay = $copy('foo.txt', 'bar.txt'); if (! $okay) { throw new RuntimeException($copy->getCapturedErrors()->pop()->get('message')); } I am -1 on removing @ for 7.x series. But, I would be in favor of all changes that remove unnecessary error messages or add functionality to better work with error messages. In my mind, those are requisite steps before removing @. Thanks, bishop --001a11432ede561f750528389e9b--