ID:               49883
 Updated by:       scott...@php.net
 Reported By:      svavar at kjarrval dot is
-Status:           Open
+Status:           Bogus
 Bug Type:         Compile Failure
 Operating System: FreeBSD 7.2
 PHP Version:      5.2.11
 New Comment:

Surround your expression with parentheses to get your expected
behavior.

The lexer treats this as a float, not the parser.


Previous Comments:
------------------------------------------------------------------------

[2009-10-15 01:27:04] svavar at kjarrval dot is

Description:
------------
The parser thinks that a period after an integer must mean the number
is a float, even though the period represents a concatenation of a
string.

Reproduce code:
---------------
<?php
$time = 2000;

echo $time/1000.' seconds';         // doesn't work
//echo $time/1000..' seconds';        // works - when not commented
out

?>

Expected result:
----------------
To see the following output:

2 seconds

Actual result:
--------------
The parser outputs a syntax error:

unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'


------------------------------------------------------------------------


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

Reply via email to