ID: 29459 Updated by: [EMAIL PROTECTED] Reported By: c dot lohl at web dot de -Status: Open +Status: Bogus Bug Type: *Math Functions Operating System: Win2k Server PHP Version: 4.3.7 New Comment:
echo $i."+".$j."=".($i+$j); will work much better. Previous Comments: ------------------------------------------------------------------------ [2004-07-30 18:16:28] c dot lohl at web dot de Sorry, forgot this: the problem does not occur with operators -, *, /. ------------------------------------------------------------------------ [2004-07-30 18:14:31] c dot lohl at web dot de Description: ------------ The parser loses the first part of the output of an expression containig numbers and strings with a simple addition at the end. Environment: Win2k Server (SP4) with Apache 2.0.50 and PHP 4.3.7 (installed via TSW 3.3.3), no changes in php.ini (but the paths). Sorry if this information does not fit your needs, I'm totally new to PHP (found this problem reading a tutorial...) Reproduce code: --------------- <? echo "This doesn't work: <br>"; $i = 16; $j = 26; echo $i."+".$j."=".$i+$j; echo "<br> No problem with this: <br>"; $k = 42; echo $i."+".$j."=".$k; ?> Expected result: ---------------- Output: 16+28=42 Actual result: -------------- Output: 42 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29459&edit=1
