Bug #12930 Updated: request for &&= and ||= operators
| From: | jimw@php.net | Date: | Sat, 27 Apr 2002 20:02:04 +0000 |
| Subject: | Bug #12930 Updated: request for &&= and ||= operators | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6298@lists.php.net to get a copy of this message | ||
ID: 12930
Updated by: jimw@php.net
Reported By: pgl@instinct.org
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: FreeBSD
PHP Version: 4.0.6
New Comment:
because && and || always return boolean values, this wouldn't do what
you want. (and suggestions to make && and || be value-preserving
instead of returning booleans has been shot down already.)
Previous Comments:
------------------------------------------------------------------------
[2001-08-23 12:40:06] pgl@instinct.org
Just a feature request for &&= and ||= operators as shortcuts for the
logical equivalent of "$var && $var = 'val'".
eg:
<?
$a = '';
$a ||= "default";
print $a;
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=12930&edit=1