|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #33419 Strings as input for php_strip_whitespace()
Submitted: 2005-06-21 11:21 UTC Modified: 2021-02-23 15:35 UTC
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: Assigned:
Status: Suspended Package: Unknown/Other Function
PHP Version: 5CVS-2005-06-21 (dev) OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2005-06-21 11:21 UTC]
Could php_strip_whitespace() be changed to work on strings, too?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-21 12:38 UTC]
A patch adding a php_string_strip_whitespace() function  
(what a great name!) is at  
 [2007-06-09 22:41 UTC] henke at henke37 dot cjb dot net
The patch file is a 404 now.
 [2016-12-30 22:55 UTC]
-Package: Feature/Change Request +Package: Unknown/Other Function
 [2020-10-11 12:20 UTC] divinity76 at gmail dot com
in case someone is looking for a quick workaround though,

function php_strip_whitespace_string(string $code):string{
    $h = tmpfile();
    fwrite($h, $code);
    $ret = php_strip_whitespace(stream_get_meta_data($h)['uri']);
    return $ret;
 [2021-02-23 15:35 UTC]
-Status: Open +Status: Suspended
 [2021-02-23 15:35 UTC]
If anybody is still interested in this feature, please pursue the
RFC process[1].  For the time being, I'm suspending this ticket.

[1] <>
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Sep 25 05:05:54 2022 UTC