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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: david at uws dot edu dot au
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Dec 21 16:01:28 2024 UTC