Req #33419 [Opn->Sus]: Strings as input for php_strip_whitespace()
| From: | cmb@php.net | Date: | Tue, 23 Feb 2021 15:35:20 +0000 |
| Subject: | Req #33419 [Opn->Sus]: Strings as input for php_strip_whitespace() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232360@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=33419&edit=1
ID: 33419
Updated by: cmb@php.net
Reported by: sebastian@php.net
Summary: Strings as input for php_strip_whitespace()
-Status: Open
+Status: Suspended
Type: Feature/Change Request
Package: Unknown/Other Function
Operating System: Irrelevant
PHP Version: 5CVS-2005-06-21 (dev)
Block user comment: N
Private report: N
New Comment:
If anybody is still interested in this feature, please pursue the
RFC process[1]. For the time being, I'm suspending this ticket.
[1] <https://wiki.php.net/rfc/howto>
Previous Comments:
------------------------------------------------------------------------
[2020-10-11 12:20:43] divinity76 at gmail dot com
in case someone is looking for a quick workaround though,
<?php
function php_strip_whitespace_string(string $code):string{
$h = tmpfile();
fwrite($h, $code);
$ret = php_strip_whitespace(stream_get_meta_data($h)['uri']);
fclose($h);
return $ret;
}
?>
------------------------------------------------------------------------
[2007-06-09 22:41:59] henke at henke37 dot cjb dot net
The patch file is a 404 now.
------------------------------------------------------------------------
[2005-06-21 12:38:25] johannes@php.net
A patch adding a php_string_strip_whitespace() function
(what a great name!) is at
http://www.schlueters.de/php_string_strip_whitespace.diff
------------------------------------------------------------------------
[2005-06-21 11:21:19] sebastian@php.net
Description:
------------
Could php_strip_whitespace() be changed to work on strings, too?
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=33419&edit=1