Bug #9765 Updated: syntax request
| From: | jimw@php.net | Date: | Sat, 27 Apr 2002 19:05:21 +0000 |
| Subject: | Bug #9765 Updated: syntax request | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6270@lists.php.net to get a copy of this message | ||
ID: 9765
Updated by: jimw@php.net
Reported By: fabiankessler@usa.net
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: all
PHP Version: 4.0.4
New Comment:
not going to happen.
Previous Comments:
------------------------------------------------------------------------
[2001-03-15 09:47:58] fabiankessler@usa.net
such a syntax would be nice:
if (getColor() == ['green'|'blue']) {
if (someFunction() != [true&null]) {
if (xy() >= [$x&$y]) {
which means
if ((getColor() == 'green') || (getColor() == 'blue')) {
but saves one call to the function
or
$myCol = getColor();
if (($myCol == 'green') || ($myCol == 'blue')) {
but looks better and saves a temp var.
$tmp = functionThatReturnsBool();
if ($tmp == true OR $tmp == null) {
sometimes it could be done with
if (in_array(getColor(), array('green', 'blue'))) {
but not always.
fab
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=9765&edit=1