From:             [EMAIL PROTECTED]
Operating system: FreeBSD 4.2-REL
PHP version:      4.2.2
PHP Bug Type:     Output Control
Bug description:  php blocks strip newlines from output

This problem never shows up when using PHP to output HTML since it ignores
newlines... but if you're outputting straight text it's a huge hassle. 
Any block of php code placed at the end of a line (adjacent to a newline
character) will "eat" that newline character.  Example:

********10<? ?>
********20

Give it a try, it outputs:

********10********20

No matter what is present in the php block this happens.  If there is a
character directly following the block it will not get eaten:

********10<? ?>C
********20

Produces:

********10C
********20

This is a big annoyance for me, as I'm using PHP to generate text (as well
as html) emails using templates.  I'm thinking the parser is just running
off the end of the line looking for another php block, but it never
bothers to put the newline back when it's done.
-- 
Edit bug report at http://bugs.php.net/?id=20556&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20556&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20556&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20556&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20556&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20556&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20556&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20556&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20556&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20556&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20556&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20556&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20556&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20556&r=isapi

Reply via email to