Req #51984 [Csd->Bgs]: new operation ?= for $var = $var ? $var :"hello world"
| From: | pajoye@php.net | Date: | Thu, 03 Jun 2010 11:13:35 +0000 |
| Subject: | Req #51984 [Csd->Bgs]: new operation ?= for $var = $var ? $var :"hello world" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151045@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51984&edit=1
ID: 51984
Updated by: pajoye@php.net
Reported by: fortruth at mabang dot net
Summary: new operation ?= for $var = $var ? $var :"hello world"
-Status: Closed
+Status: Bogus
Type: Feature/Change Request
Package: Scripting Engine problem
PHP Version: trunk-SVN-2010-06-03 (SVN)
Assigned To: sjoerd
New Comment:
not really, we have ?: now, which does mostly what is requested here.
Previous Comments:
------------------------------------------------------------------------
[2010-06-03 13:04:01] sjoerd@php.net
The ifsetor operator is planned for PHP6:
http://www.php.net/~derick/meeting-notes.html#ifsetor-as-replacement-for-foo-
isset-foo-foo-something-else
------------------------------------------------------------------------
[2010-06-03 09:27:29] fortruth at mabang dot net
and this maybe more useful for
stand for:
if(ï¼$var)$var = "hello world";
------------------------------------------------------------------------
[2010-06-03 08:52:13] fortruth at mabang dot net
Description:
------------
as you have make ?: more easy.
but I think there can be a more easy for other one.
like
$var ?= "hello world";
there can be equal that
$var = $var ? $var : "hello world";
for now short is
$var = $var ? : "hello world";
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51984&edit=1