On Mon, Sep 8, 2014 at 4:06 AM, Michael Wallner <m...@php.net> wrote:

> On 07/09/14 14:25, Andrea Faulds wrote:
>
> >
> > There’s actually a quite serious issue just now, which is that it
> > evaluates the first operand twice if it’s not empty. This is because
> > $a ?: $b is expanded to empty($a) ? $b : $a, such that if you did
> > something which mutates state in there, it’d happen twice. This is
> > obviously not good, and I’m going to figure out how to fix this.
> >
>
> This could very well be the reason why it is like it is today.
>
>
I agree. The more I think about, the more this seems weird. What if I
explicitly want to use ternary to check isset() and not empty?

Reply via email to