php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35359 lost newline/whitespace after php closing tag
Submitted: 2005-11-24 06:25 UTC Modified: 2005-11-24 09:40 UTC
From: junggle at centrum dot cz Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.4.1 OS: linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: junggle at centrum dot cz
New email:
PHP Version: OS:

 

 [2005-11-24 06:25 UTC] junggle at centrum dot cz
Description:
------------
the php parser eats new line character and/or any whitespace characters after closing tag ( ?> )

tested on linux php4.3.10
tested on win32 php5.0.4

sorry if this has been documented, i searched but didn't find
anything related.

-jj

Reproduce code:
---------------
line <?php?>
line

Expected result:
----------------
line
line

Actual result:
--------------
line line

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-24 09:40 UTC] junggle at centrum dot cz
thanx sniper,
i didn't know about this info.

php manual says:
"everything outside of a pair of opening and closing tags is ignored by the PHP parser"

and

"when PHP hits the closing tag, it simply starts outputting whatever it finds until it hits another opening tag"


i also tried putting a space after the closing tag but php parser eats it too.

is there any way to turn this "feature" off? ;)
i really need php to only parse php tags and keep the rest intact.

thanks for your help.
-jj
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 22:01:27 2024 UTC