RE: [PHP] Assignment operator proposal
| From: | Kevin Stone | Date: | Wed, 20 Mar 2002 23:38:07 +0000 |
| Subject: | RE: [PHP] Assignment operator proposal | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-89430@lists.php.net to get a copy of this message | ||
There seems to be a parse error in your code. The words "Python" and
"enthusiast" can not exist together in the same substr. This will
result in the "LMAO error" you've been receiving. :)
-Kevin
-----Original Message-----
From: Bogdan Stancescu [mailto:mgv@fx.ro]
Sent: Wednesday, March 20, 2002 3:36 PM
To: php-general@lists.php.net
Subject: [PHP] Assignment operator proposal
Hi all!
I'd like to hear from a single one of you who isn't tired of code
similar to
<?
if (!$whatever) {
$whatever=something;
}
?>
or else
<?
if ($whatever)
{
$somethingelse=$whatever;
}
?>
How about a new asignment operator which would shut up all those Python
enthusiasts - let's say the new operator would be caret - and we could
replace the first example with
<?
$whatever^=something;
?>
and the second example with
<?
$somethingelse=^$whatever;
?>
What's more, we could also have
<?
$yetanother^=^$anything;
?>
which would assign $anything to $yetanother if and only if both are note
null.
What do you think?
Bogdan Stancescu
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php