ID:               27955
 User updated by:  jkmail at tpg dot com dot au
-Summary:          Bad output of variable
 Reported By:      jkmail at tpg dot com dot au
 Status:           Open
 Bug Type:         Output Control
 Operating System: FreeBSD 4.9
 PHP Version:      5.0.0RC1
 New Comment:

Sorry folks,



It just didn't reproduce on linux/php4 (I tested it on linux, as I
didn't have php4 installed on the freebsd machine at the time). This
seems to be a FreeBSD specific issue. 



This seems to be a problem with other languages like perl as well, so
this bug could very well be marked as bogus. I don't like how it messes
up the output though. Is there a way we can clear the buffer or
something?


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

[2004-04-11 18:53:15] jkmail at tpg dot com dot au

Did a little more testing, and this is more of an input/output issue.



Code:

<?= "\n" . 4 . "\n" ?>

Produces:

^D

4



PHP4 did not suffer from this issue.

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

[2004-04-11 18:34:02] jkmail at tpg dot com dot au

Description:
------------
When executing this code from STDIN (via CLI), an extra 'D' character
appears in the output for the first time the function is executed.



It behaves normally when its reading the code from a file. Could this
be the 'D' character from the 'Ctrl-D' combination somehow appearing?



Configure:

'./configure' '--prefix=/usr/local/php5' '--with-apxs2' '--disable-cgi'
'--disable-ipv6' '--with-openssl' '--enable-bcmath' '--with-bzip2'
'--with-curl' '--with-gd' '--enable-gd-native-ttf' '--with-imap'
'--with-mysql=/usr/local/lib/mysql' '--enable-soap' '--with-xmlrpc'
'--with-zlib-dir=/usr'

Reproduce code:
---------------
<?php

function a() {

        $var = 4;

        print $var . "\n";

}



a();

a();

?>

Expected result:
----------------
4

4

Actual result:
--------------
4D

4


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


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

Reply via email to