Req #63632 [Com]: $var =. 'val';
| From: | inefedor at gmail dot com | Date: | Wed, 28 Nov 2012 10:57:51 +0000 |
| Subject: | Req #63632 [Com]: $var =. 'val'; | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-174992@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=63632&edit=1
ID: 63632
Comment by: inefedor at gmail dot com
Reported by: bensor987 at neuf dot fr
Summary: $var =. 'val';
Status: Open
Type: Feature/Change Request
Package: Variables related
Operating System: All
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Collides with:
$asd =.4;
echo $asd;
Output should be: 0.4
Previous Comments:
------------------------------------------------------------------------
[2012-11-28 09:57:01] bensor987 at neuf dot fr
Description:
------------
Why not add "$var =. 'val';" syntax ?
It would concatenate 'val' before $var.
Actually, you have to do this
<?php
$var = 'val' . $var;
?>
My suggestion make the code shorter :
<?php
$var =. 'val';
?>
Test script:
---------------
<?php
$a = "Hello ";
$b = $a . "World!"; // now $b contains "Hello World!"
$c = "World! " . $a; // now $c contains "World! Hello "
$a = $b = "Hello ";
$a .= "World!"; // now $a contains "Hello World!"
$b =. "World! "; // now $b contains "World! Hello "
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63632&edit=1