Re: Bug #1535 Updated: isset() with trinary operator implicitly declares array variable
| From: | Dave Walton | Date: | Mon, 21 Jun 1999 20:56:52 +0000 |
| Subject: | Re: Bug #1535 Updated: isset() with trinary operator implicitly declares array variable | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7339@lists.php.net to get a copy of this message | ||
Quoting Bug Database <php-dev@lists.php.net>:
> You're making order of execution assumptions that are
> not guaranteed.
>
> Full Bug description available at: http://bugs.php.net/?id=1535
Hmmm... If that's the case, then wouldn't
$x = isset($x) ? 'y' : 'n';
also not work? Why does it work with scalars but not arrays?
Or do you mean that the order is not guaranteed in that case, either?
Which would mean it is not safe to use the trinary operator to initialize
variables in that manner!
Dave