Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > #35359 : lost newline/whitespace after php closing tag
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 24th April 21:14
php-bugs
External User
 
Posts: 1
Default #35359 : lost newline/whitespace after php closing tag



From: junggle at centrum dot cz
Operating system: linux
PHP version: 4.4.1
PHP Bug Type: Scripting Engine problem
Bug description: lost newline/whitespace after php closing tag

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 do***ented, i searched but didn't find
anything related.

-jj

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

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

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

--
Edit bug report at http://bugs.php.net/?id=35359&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35359&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35359&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35359&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35359&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35359&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35359&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35359&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35359&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35359&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35359&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35359&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35359&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35359&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35359&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35359&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35359&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35359&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35359&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35359&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35359&r=mysqlcfg
  Reply With Quote


  sponsored links


2 25th April 00:11
External User
 
Posts: 1
Default #35359 : lost newline/whitespace after php closing tag



ID: 35359
Updated by: sniper@php.net
Reported By: junggle at centrum dot cz
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: linux
PHP Version: 4.4.1
New Comment:

FAQ:

http://www.php.net/manual/en/faq.using.php#faq.using.newlines

Previous Comments:
------------------------------------------------------------------------

[2005-11-24 06:25:57] 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 do***ented, i searched but didn't find
anything related.

-jj

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

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

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


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35359&edit=1
  Reply With Quote
3 25th April 10:57
php-bugs
External User
 
Posts: 1
Default #35359 : lost newline/whitespace after php closing tag


ID: 35359
User updated by: junggle at centrum dot cz
Reported By: junggle at centrum dot cz
Status: Bogus
Bug Type: Scripting Engine problem
Operating System: linux
PHP Version: 4.4.1
New Comment:

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


Previous Comments:
------------------------------------------------------------------------

[2005-11-24 09:21:45] sniper@php.net

FAQ:

http://www.php.net/manual/en/faq.using.php#faq.using.newlines


------------------------------------------------------------------------

[2005-11-24 06:25:57] 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 do***ented, i searched but didn't find
anything related.

-jj

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

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

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


------------------------------------------------------------------------


--
Edit this bug report at http://bugs.php.net/?id=35359&edit=1
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666