#27955 [Opn]: Bad output of variable

From: Date: Sun, 11 Apr 2004 22:53:15 +0000
Subject: #27955 [Opn]: Bad output of variable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-57934@lists.php.net to get a copy of this message
ID: 27955 User updated by: jkmail at tpg dot com dot au Reported By: jkmail at tpg dot com dot au Status: Open -Bug Type: Variables related +Bug Type: Output Control Operating System: FreeBSD 4.9 PHP Version: 5.0.0RC1 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#57934) next »