ID: 49603 Updated by: johan...@php.net Reported By: peiciu at gmail dot com -Status: Open +Status: Bogus Bug Type: HTTP related Operating System: win XP sp3 PHP Version: 5.2.11 New Comment:
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 You do a concatenation before echo'ing the result, for doing that write() is being called which creates output... Previous Comments: ------------------------------------------------------------------------ [2009-09-19 21:10:52] peiciu at gmail dot com Description: ------------ display problems with function Reproduce code: --------------- <?php $val = ""; function write($val) { if($val == 11) {echo "text";} else if($val == 12) {echo "Text";} else if($val == 13) {echo "TEXT";} else if($val < 11) {echo $val;} } $val_3 = "13"; echo "<pre>" . write($val_3) . " - " . write($val_3) . ":" . write($val_3) . "</pre><br />";?> Expected result: ---------------- TEXT - TEXT:TEXT Actual result: -------------- TEXTTEXTTEXT - : ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49603&edit=1