Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67845 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66554 invoked from network); 26 Jun 2013 06:50:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2013 06:50:58 -0000 Authentication-Results: pb1.pair.com header.from=patrick.allaert@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.42 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 209.85.219.42 mail-oa0-f42.google.com Received: from [209.85.219.42] ([209.85.219.42:50308] helo=mail-oa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9D/E0-60917-15F8AC15 for ; Wed, 26 Jun 2013 02:50:58 -0400 Received: by mail-oa0-f42.google.com with SMTP id j6so4948791oag.15 for ; Tue, 25 Jun 2013 23:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=DZnNjSBtzkPcLo9W3SilmHnVd9eoZpoOkN0EvCQK3po=; b=KT1lm/iqspugjFyEhOEUK8iAPuHZwoAk/le880cF2Nsiqgcazu3d3cYnVt1X0LuW5y V61YdpFlL5hlz3txBLktHGV5Ppc6nvktegrrxdCjvlwJxcnXmViNvYr+1kMTkMOprMGV IIjE0s6InFSCgElFK298DZI6mhEnzxoAo9P6Xjp7Nm6VZWhTmISQxI+QI3mC+FSub8y0 ncCsX07HrTIF+e+bMCWnqCg88vEOKM+7pvaL49SAAhzpnSEHaTc8ztJcNuXjId9XCFjc oIdYLmRxHXmaTFD20Uk3IgsDZogn82wzOrYxP8j7UR0xmnbgv4YeluSuC0hviaMCUO0S FIDw== MIME-Version: 1.0 X-Received: by 10.60.38.161 with SMTP id h1mr1164995oek.8.1372229454421; Tue, 25 Jun 2013 23:50:54 -0700 (PDT) Sender: patrick.allaert@gmail.com Received: by 10.76.7.169 with HTTP; Tue, 25 Jun 2013 23:50:54 -0700 (PDT) In-Reply-To: References: Date: Wed, 26 Jun 2013 08:50:54 +0200 X-Google-Sender-Auth: HxTo17rzGVFC0B5c-hr32GNfT-8 Message-ID: To: Nikita Popov Cc: Joost Koehoorn , PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Announcing RFC 'Anonymous Catches' From: patrickallaert@php.net (Patrick ALLAERT) 2013/6/25 Nikita Popov : > but I'm against the generic catch{} statement. I'm sharing Nikita's opinion, with the difference of a bit more enthusiasm on leaving off the variable as it could make it more obvious that there is no intention in using the variable, and that no memory should be kept for it. This might be better than doing: try { [...] } catch (Exception $ignore) { unset($ignore); } [...] However, I see other cases where a variable is technically required but not used: abstract class AbstractPrinter { abstract public function print($message); } class Printer extends AbstractPrinter { public function print($message) { echo $message; } } class BlackholePrinter extends AbstractPrinter { public function print($message) { } } In the previous example, $message is not "used" in BlackholePrinter::print() (as well as in AbstractPrinter::print()). How do you intend to make that consistent with: catch(Exception) ? Patrick