Req #33419 [Com]: Strings as input for php_strip_whitespace()

From: Date: Sun, 11 Oct 2020 12:20:43 +0000
Subject: Req #33419 [Com]: Strings as input for php_strip_whitespace()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229540@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 Comment by: divinity76 at gmail dot com Reported by: sebastian@php.net Summary: Strings as input for php_strip_whitespace() Status: Open 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: 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; } ?> Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#229540) next »