#40144 [Bgs->Opn]: Returning int . string gives parse error
| From: | Quis at omicidio dot nl | Date: | Tue, 16 Jan 2007 14:17:33 +0000 |
| Subject: | #40144 [Bgs->Opn]: Returning int . string gives parse error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107655@lists.php.net to get a copy of this message | ||
ID: 40144
User updated by: Quis at omicidio dot nl
Reported By: Quis at omicidio dot nl
-Status: Bogus
+Status: Open
-Bug Type: Scripting Engine problem
+Bug Type: Feature/Change Request
Operating System: FreeBSD
PHP Version: 5.2.0
New Comment:
Well,
Then i`ll make it an RfC :)
Previous Comments:
------------------------------------------------------------------------
[2007-01-16 14:03:42] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2007-01-16 13:50:20] Quis at omicidio dot nl
The 'actual' code I got this error on was:
echo 1.str_repeat('sometext', 3);
Also resulting in Parse error: syntax error, unexpected T_STRING,
expecting ',' or ';'
------------------------------------------------------------------------
[2007-01-16 13:47:52] Quis at omicidio dot nl
Description:
------------
Unexpected parse error
Reproduce code:
---------------
Not working:
echo 1.'sometext';
or,
return 1.'sometext';
Working:
$i=1;
echo $i.'sometext';
Expected result:
----------------
1sometext
Actual result:
--------------
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,
expecting ',' or ';'
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40144&edit=1