Re: Construct Request
| From: | Andi Gutmans | Date: | Thu, 15 Apr 2004 18:15:03 +0000 |
| Subject: | Re: Construct Request | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9206@lists.php.net to get a copy of this message | ||
It could be implemented but I don't see the big advantage over $bar ? 0 : $base
It's one character...
At 02:09 PM 4/15/2004 -0400, Sean Coates wrote:
Is there a good reason to NOT implement this? If not, I'm +1 on that (if I carry ANY weight at all (-: ) BC isn't an issue, and it would be a very useful feature, IMHO.. S Sascha Schumann wrote:-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.phpThat is basically the same idea once proposed as extending the ternary operator (credit goes to GCC and its C extension). $bar ? : $baz; If $bar evaluates to true, the expression evaluates to $bar or to 0, respectively. - Sascha