Bug #14669: print_r inconsistancy with newlines
| From: | sander@php.net | Date: | Sun, 23 Dec 2001 13:25:17 +0000 |
| Subject: | Bug #14669: print_r inconsistancy with newlines | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-74859@lists.php.net to get a copy of this message | ||
From: sander@php.net
Operating system: Debian Linux, Win2K
PHP version: 4.1.0
PHP Bug Type: Variables related
Bug description: print_r inconsistancy with newlines
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 bug report at: http://bugs.php.net/?id=14669&edit=1