Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75131 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17423 invoked from network); 29 Jun 2014 10:40:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Jun 2014 10:40:11 -0000 Authentication-Results: pb1.pair.com header.from=php@thekid.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@thekid.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain thekid.de from 212.227.126.130 cause and error) X-PHP-List-Original-Sender: php@thekid.de X-Host-Fingerprint: 212.227.126.130 mout.kundenserver.de Received: from [212.227.126.130] ([212.227.126.130:55050] helo=mout.kundenserver.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/22-27136-50DEFA35 for ; Sun, 29 Jun 2014 06:40:06 -0400 Received: from oxbsltgw54.schlund.de (oxbsltgw54.schlund.de [172.19.249.201]) by mrelayeu.kundenserver.de (node=mreue007) with ESMTP (Nemesis) id 0M4gBt-1WkE0q2e1F-00yzOf; Sun, 29 Jun 2014 12:40:01 +0200 Date: Sun, 29 Jun 2014 12:40:01 +0200 (CEST) Reply-To: Timm Friebe To: internals@lists.php.net Message-ID: <801311915.137460.1404038401570.open-xchange@oxbsltgw54.schlund.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.4.2-Rev24 X-Provags-ID: V02:K0:10w+PjJhwvzz4ULg+AU5LrFMJ8PpjPZK552Il04DDlg zzrDh9yy1uuh5oEJe3OKKbrdGRW3GuwABODBh8I0K7R8R4Y6UB ljuCqESIvCDm+b/CZ8qAntgQlQwyl0AR3R4rkCkKgAmHBTqdeu quRzctnTPqqRtHQJhettspr0Bp3uvJn8rcNm6s5u1UXbbEccip Eby1ppfd4S9ep3EJ1ATtsSbHbd0AseL8ZpWt8rxEfFhGmqn/0/ uegXkU75emPRVDmuwUIEkz9iLa2/d/PgHoJn6j9cis9Cus+An4 wzO/2OvlBIeCgP9rr9tSzDHX4O2jRoAy/H+T1AGnqm/s1n169N 8Y750Ck51dk4N7zsJ8fqbrVO9vey0HYtFIDU/7H591gKd8NRDY DkBlRQcN5qGqbPtZmDXq9LrVkxYyEkZPJw= Subject: [VOTE] RFC: Catchable "call to a member function of a non-object" From: php@thekid.de (Timm Friebe) Dear all, 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! -Timm 1: https://wiki.php.net/rfc/catchable-call-to-member-of-non-object#exampleexceptions