Bug #14669 Updated: print_r inconsistancy with newlines

From: Date: Sun, 07 Jul 2002 17:01:01 +0000
Subject: Bug #14669 Updated: print_r inconsistancy with newlines
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13396@lists.php.net to get a copy of this message
ID: 14669 Updated by: derick@php.net Reported By: sander@php.net -Status: Open +Status: Won't fix Bug Type: Variables related Operating System: Debian Linux, Win2K PHP Version: 4.1.0 New Comment: print_r is a debugging tool, and I don't see any reason why this behavior should bother anybody. Changing status to "Won't fix". Derick Previous Comments: ------------------------------------------------------------------------ [2001-12-23 08:25:17] sander@php.net print_r ends with a newline if you print_r() an array, but not if you print_r() a string or number: $foo="abc"; $bar=123; echo "-"; print_r($foo); echo "-"; print_r($bar); echo "-"; Ouput: -abc-123- $foo=array(123, "abc"); echo "-"; print_r($foo); echo "-"; Output: -Array ( [0] => 123 [1] => abc ) - ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=14669&edit=1

« previous php.bugs (#13396) next »