Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76188 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96865 invoked from network); 27 Jul 2014 08:11:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2014 08:11:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.178 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.178 mail-lb0-f178.google.com Received: from [209.85.217.178] ([209.85.217.178:48492] helo=mail-lb0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/9E-22380-634B4D35 for ; Sun, 27 Jul 2014 04:11:34 -0400 Received: by mail-lb0-f178.google.com with SMTP id c11so4782823lbj.9 for ; Sun, 27 Jul 2014 01:11:41 -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:from:date:message-id :subject:to:cc:content-type; bh=fXlMgo1qfDS+zDwhz8sgVsBUOA0dpsjeaGt31BZQuZg=; b=mR/lwsbY+qZ3SaQRkMtsc65ijleaUlZjocjsAw1gJHdBPpo0kC/roBw5gvfD0GGIxX vtUvYzn7us4tjQun+Esh0KfkM99UAkhjQrLlGDqUUAA9x0yJXj410ZWYyrA2VJtm13UK k4zoxdK6APaxQ82akiBcQsiWT/71Jasr+ZGCSXtOENodwip5uAgltm7Zi1AQbu+INOB0 oQHU1hcPd2rTG4lReYl2+9XESyU4o7KzOOMu5RrCXLq3nn3KXShXTiDhaIICoRrSEUR5 qYKTTHd17dEBT+zwAYXNaN4hpOl6iWBk7MS+il4MFVm/eSID1cAPK9VkG2+Mf6+Yq+vy TZRQ== X-Received: by 10.112.74.200 with SMTP id w8mr1272945lbv.79.1406448701131; Sun, 27 Jul 2014 01:11:41 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.214.228 with HTTP; Sun, 27 Jul 2014 01:11:01 -0700 (PDT) In-Reply-To: <801311915.137460.1404038401570.open-xchange@oxbsltgw54.schlund.de> References: <801311915.137460.1404038401570.open-xchange@oxbsltgw54.schlund.de> Date: Sun, 27 Jul 2014 17:11:01 +0900 X-Google-Sender-Auth: O7-u6105wlRPF-J454_9wp7twhY Message-ID: To: Timm Friebe Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=14dae9d248e439d6a704ff285b47 Subject: Re: [PHP-DEV] [VOTE] RFC: Catchable "call to a member function of a non-object" From: yohgaki@ohgaki.net (Yasuo Ohgaki) --14dae9d248e439d6a704ff285b47 Content-Type: text/plain; charset=UTF-8 Hi Timm, On Sun, Jun 29, 2014 at 7:40 PM, Timm Friebe wrote: > a couple of weeks ago, I proposed a change to the handling of the situation > where methods are called on non-objects. Instead of an E_ERROR, the engine > would > raise an E_RECOVERABLE_ERROR, and enable framework and library authors to > handle > this. > > An intriguing usecase from my POV is to make use of this in tools like > PHPUnit; > instead of just printing a fatal error in the middle of a test run and > exiting, > the tools can decide to raise an exception and display the very much more > helpful backtrace. No third-party PHP extensions needed for this, just a > simple > set_error_handler() call [1]. > > I've verified various places like phpdbg and added a bunch of tests and am > glad > to extend that should anyone come up with a situation he/she feel this > would > behave in an unstable manner; athough this is realized in a somewhat > similar > manner to type hint mismatches, which have proven to be quite stable. > > Anyhow, I'd now like to see where we'd come out at and would kindly ask > you to > vote for or against inclusion of this feature: > > https://wiki.php.net/rfc/catchable-call-to-member-of-non-object#vote > > Thanks in advance! > I like the idea. Only thing that I don't like is it depends on error message to be useful rather than error code/status. Was this discussed? Just curious. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --14dae9d248e439d6a704ff285b47--