Req #45593 [Opn->Sus]: change the way 'implode' handles NULL values

From: Date: Tue, 04 Sep 2018 17:12:15 +0000
Subject: Req #45593 [Opn->Sus]: change the way 'implode' handles NULL values
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216878@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=45593&edit=1 ID: 45593 Updated by: cmb@php.net Reported by: getmequick at gmail dot com Summary: change the way 'implode' handles NULL values -Status: Open +Status: Suspended Type: Feature/Change Request Package: Strings related Operating System: Win XP PHP Version: 5.2.6 Block user comment: N Private report: N New Comment: At least due to the resulting BC break this feature request requires discussion on the internals@ mailing list, and perhaps an RFC[1]. Anybody is welcom to start the discussion. For the time being, I'm suspending this ticket. [1] <https://wiki.php.net/rfc/howto> Previous Comments: ------------------------------------------------------------------------ [2008-07-22 15:18:07] getmequick at gmail dot com Description: ------------ I'd like to know if it's reasonable to have 'implode' function do not concatenate 'null/false' values into resulting string. like it does 'http_build_query' (http://php.net/http_build_query) Reproduce code: --------------- <?php $dirs = array( 'dir1', 'dir2', false, 'dir3' ); $dir_str = implode( DIRECTORY_SEPARATOR, $dirs); echo $dir_str; ?> Expected result: ---------------- dir1\dir2\dir3 Actual result: -------------- dir1\dir2\\dir3 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=45593&edit=1

« previous php.bugs (#216878) next »