Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-09 Thread Ángel González
Sanford Whiteman wrote: > Same here. > > Here's my take: > > [1] I don't like ?? / ? because it is disjunctive with === / ==.. The > extra equals sign strengthens equality comparison, while the extra > question mark essentially _weakens_ the ternary operator (making it > more forgiving). (

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-09 Thread D. Dante Lorenso
On 4/7/11 5:35 PM, Etienne Kneuss wrote: On Apr 07 18:03:48, Rasmus Lerdorf wrote: On 4/7/11 5:59 PM, Matthew Weier O'Phinney wrote: It may change the semantics as they stand, but I'd argue that the _expectation_ from the shorthand ternary is to shorten code that currently uses isset(). As it i

Re: [PHP-DEV] Why does zend_call_function return SUCCESS if an exception is thrown

2011-04-09 Thread Herman Radtke
> Because what "success" means in this context is that the function could be > executed. If you see the implementation of zend_call_function, you'll notice > the conditions that return FAILURE are those where the execution of the > target function doesn't even begin. > > You can check for exception

Re: [PHP-DEV] Why does zend_call_function return SUCCESS if an exception is thrown

2011-04-09 Thread Gustavo Lopes
On Sat, 09 Apr 2011 17:03:16 +0100, Herman Radtke wrote: An extension is using zend_call_function to call a userland function. If the userland function throws an exception, zend_call_function will still return SUCCESS. Why isn't zend_call_function returning FAILURE on an exception? Is there

[PHP-DEV] Why does zend_call_function return SUCCESS if an exception is thrown

2011-04-09 Thread Herman Radtke
An extension is using zend_call_function to call a userland function. If the userland function throws an exception, zend_call_function will still return SUCCESS. Why isn't zend_call_function returning FAILURE on an exception? Is there a way to check if an exception was thrown after zend_call_func

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-09 Thread Rune Kaagaard
Hi guys Below is a discussion about some of the issues being raised. Again a nicely formatted version of the whole thing is here: https://gist.github.com/909711. ## Discussion ## ### About changing the beviour of the ternary shortcut ### @Jordi, others Some suggest adding an implicit `isset` a