Re: RFC: Catchable "call to a member function of a non-object"
On 29 April 2014 10:26, Derick Rethans <derick@php.net> wrote:
> Programming mistakes should not be hidden by error
>
Of course, but what about having a PHPUnit tests that hard-fail due to a
"PHP Fatal error: Call to a member function foo() on a non-object in ..."?
Just being able to have a handler that catches it as an error is pretty ok,
and it surely allows me to see if there are other failures in a huge test
suite
without having to come up with some crazy code just to run the tests one by
one.
This use case already makes it worth having this improvement in my opinion.
Cheers,
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
Thread (11 messages)