|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-09-22 09:51 UTC] 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"
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 00:00:02 2025 UTC |
Sorry, expected result should be: php -r 'var_dump(php_strip_whitespace("test.php"));' Command line code:1: string(4) "<?\n "