#19883 [NEW]: string concatenation bug
| From: | skaventruc at yahoo dot fr | Date: | Sun, 13 Oct 2002 01:13:42 +0000 |
| Subject: | #19883 [NEW]: string concatenation bug | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-22258@lists.php.net to get a copy of this message | ||
From: skaventruc@yahoo.fr
Operating system: Windows NT
PHP version: 4.2.0
PHP Bug Type: Strings related
Bug description: string concatenation bug
concatenation hazard ... on :
$a = 2;
echo 'c='.$a*2 .' ok';
it produce a good result : "c=4 ok"
but :
$a = 2;
echo 'c='.$a*2.' ok';
produce a parse error :
unexpected T_CONSTANT_ENCAPSED_STRING ...
also the following works :
echo 'c='.$a*2..' ok';
so it should be a bug when trying to see
"2." as a float when it is an integer followed by a concatenation operator
(that's the problem when using
operators that are also separators...)
--
Edit bug report at http://bugs.php.net/?id=19883&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19883&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19883&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19883&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19883&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19883&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19883&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19883&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19883&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19883&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19883&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19883&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=19883&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=19883&r=isapi