#40144 [Opn]: Returning int . string gives parse error

From: Date: Tue, 16 Jan 2007 13:50:21 +0000
Subject: #40144 [Opn]: Returning int . string gives parse error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-107653@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: Open Bug Type: Scripting Engine problem Operating System: FreeBSD PHP Version: 5.2.0 New Comment: 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 ';' Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#107653) next »