ID: 9765
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-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] [EMAIL PROTECTED]
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