Re: RFC: Catchable "call to a member function of a non-object"
The example from the Introduction looks like this:
// ...when getAction()returns null:
$this->getAction()->invoke();
My first thought is that if getAction is declared with a return type as per
the currently under discussion return type RFC, then when a null is
returned you'd get an E_RECOVERABLE error there already. I realize there
are other cases and motivations for this RFC, but this is one motivating
case for the return type RFC in the first place.
Thread (11 messages)