Doc #73142 [Opn]: php_strip_whitespace does not work on files with short tags
| From: | rob dot bast at gmail dot com | Date: | Thu, 22 Sep 2016 09:52:41 +0000 |
| Subject: | Doc #73142 [Opn]: php_strip_whitespace does not work on files with short tags | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13930@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73142&edit=1
ID: 73142
User updated by: rob dot bast at gmail dot com
Reported by: rob dot bast at gmail dot com
Summary: php_strip_whitespace does not work on files with
short tags
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Sorry, expected result should be:
php -r 'var_dump(php_strip_whitespace("test.php"));'
Command line code:1:
string(4) "<?\n "
Previous Comments:
------------------------------------------------------------------------
[2016-09-22 09:51:24] rob dot bast at gmail dot com
Description:
------------
Using php_strip_whitespace on a file that makes use of the short tag notation <? does not result
in any whitespace being stripped (such as docblocks etc).
This could/should be explicitly mentioned in the documentation.
Test script:
---------------
<?
/**
* does not get removed
*/
Expected result:
----------------
% php -r 'var_dump(php_strip_whitespace("test.php"));'
Command line code:1:
string(7) "<?\n "
Actual result:
--------------
% php -r 'var_dump(php_strip_whitespace("test.php"));'
Command line code:1:
string(37) "<?\n\n/**\n * does not get removed\n */\n\n"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73142&edit=1