Re: Implicit isset in ternary operator
| From: | Gustavo Lopes | Date: | Wed, 18 Jul 2012 14:33:23 +0000 |
| Subject: | Re: Implicit isset in ternary operator | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-61400@lists.php.net to get a copy of this message | ||
On Wed, 18 Jul 2012 16:15:44 +0200, Rafael Dohms wrote:
With the syntax improvements for 5.4 and some of the de-referencing work, code looks so much sleeker then before, but there is still one use case that really bugs me. Given this code: $width = (isset($config['width']))? $config['width'] : 300;Do we have to do this again?... We had this discussion an year ago. See http://grokbase.com/t/php/php-internals/113zbx5y77/implicit-isset-isempty-check-on-short-ternary-operator http://grokbase.com/t/php/php-internals/114br1w6gs/proposed-access-modifier-silent-was-re-php-dev-implicit-isset-isempty-check-on-short-ternary-operator -- Gustavo Lopes