From:             [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:      4.0.6
PHP Bug Type:     Math related
Bug description:  Odd Math/String behaviour when 'echo'ing...

The following code produces strange output:
<?php
 echo "one".  1+2  ."two<br>\n";
 echo "one". (1+2) ."two<br>\n";
?>
(output:)
2two
one3two

maybe I'm overlooking something, but when excluding the parentheses, causes
the first "one" to not display, and the addition to work incorrectly.
Please email me if you need more details. Obviously, the workaround is to
put parentheses around the math.

Is this because, without parentheses, PHP is treating the statement like
this:

echo "one1" + "2two"; // or something similar?

Using PHP4.0.6, Win32 pre-compiled. Other systems untested.

S

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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to