Re: RFC: Catchable "call to a member function of a non-object"

From: Date: Mon, 28 Apr 2014 09:07:11 +0000
Subject: Re: RFC: Catchable "call to a member function of a non-object"
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi,

On Sun, 2014-04-27 at 14:00 +0200, [email protected] wrote:
> Hello everyone,
> 
> as per the RFC process I'd like to start a discussion on the RFC
> I've put up on the RFC Wiki:
> 
>   https://wiki.php.net/rfc/catchable-call-to-member-of-non-object
>   RFC: Catchable "call to a member function of a non-object", 1.0
> 
> The essence of this pull request is that it converts this fatal error
> into E_RECOVERABLE_ERRORs. Framework authors may choose to convert
> these into exceptions, as they already do with argument type mismatches.

The definition of E_ERROR is "an error where the engine can't fully
recover", so if we can recover there should be no need for a vote ;-)

But I have doubts whether this works reliably in all cases where
functions are called. i.e. how will usort() behave? From a very quick
grep it seems that i.e. sapi/phpdbg doesn't check the return value of
zend_call_function, these things have to be reviewed too. Right now code
(should not but) could rely on the engine doing a bailout which will
shutdown the request on errors to call a function/method.

johannes



Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc

Thread (11 messages)

« previous php.internals (#73823) next »