Req #51984 [Opn->Csd]: new operation ?= for $var = $var ? $var :"hello world"

From: Date: Thu, 03 Jun 2010 11:04:01 +0000
Subject: Req #51984 [Opn->Csd]: new operation ?= for $var = $var ? $var :"hello world"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-151042@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:  sjoerd@php.net
 Reported by: fortruth at mabang dot net
 Summary:     new operation ?=  for  $var = $var ? $var :"hello world"
-Status:      Open
+Status:      Closed
 Type:        Feature/Change Request
 Package:     Scripting Engine problem
 PHP Version: trunk-SVN-2010-06-03 (SVN)
-Assigned To: 
+Assigned To: sjoerd

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[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


Thread (4 messages)

« previous php.bugs (#151042) next »