php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #241 Post <?PHP ... ?> LF's ignored?
Submitted: 1998-04-04 00:55 UTC Modified: 1998-04-04 07:30 UTC
From: david at uws dot edu dot au Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0 Release Candidate 3 OS: (n/a)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 + 35 = ?
Subscribe to this entry?

 
 [1998-04-04 00:55 UTC] david at uws dot edu dot au
Purely cosmetic (used when trying to leave no trace in
output HTML that PHP was ever there..) - if an embedded
PHP command is followed by a LF (in the PHP/HTML source),
then shouldn't it be present in the output HTML stream?

For example, if you have something like:

      ...
   </DIV><?PHP
      ...
   ?>

   <TABLE>
      ...

Wouldn't you expect the output (assuming the PHP code output
nothing itself) to be like so:

      ...
   </DIV>

   <TABLE>
      ...

Yet when viewed in Netscape 4.04 (Linux, output coming from
a Solaris server), the output is actually:

      ...
   </DIV>
   <TABLE>
      ...

The blank line in the middle is missing, as though the
trailing LF had been eaten.

For the most part this is purely cosmetic as I said - unless
someone is trying to match a certain output format (to be
parsed by an automated tool) in which case they'll have to
start inserting additional LF's into the output stream just
to compensate (which then becomes a guessing game).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-04-04 07:30 UTC] zeev
Intended behavior
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 17:01:29 2024 UTC