#43756 [Opn->Bgs]: ob_get_contents() ignores the first new line after ?>
| From: | johannes@php.net | Date: | Sat, 05 Jan 2008 02:51:19 +0000 |
| Subject: | #43756 [Opn->Bgs]: ob_get_contents() ignores the first new line after ?> | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121049@lists.php.net to get a copy of this message | ||
ID: 43756
Updated by: johannes@php.net
Reported By: aleast at capri dot it
-Status: Open
+Status: Bogus
Bug Type: Output Control
Operating System: Linux Ubuntu 7.10
PHP Version: 5.2.5
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
.
Previous Comments:
------------------------------------------------------------------------
[2008-01-05 01:18:08] aleast at capri dot it
Description:
------------
ob_get_contents() ignores the first new line after ending php tag ?>.
Reproduce code:
---------------
<?php ob_start(); ?>
a
<?php
$content = ob_get_contents();
ob_end_clean();
for ($i = 0; $i < strlen($content); $i++) {
echo ord($content[$i])."\n";
}
?>
Expected result:
----------------
10
97
10
Actual result:
--------------
97
10
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43756&edit=1