Edit report at http://bugs.php.net/bug.php?id=51984&edit=1

 ID:          51984
 Updated by:  paj...@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] sjo...@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

Reply via email to