note 126584 added to function.implode

From: Date: Sat, 13 Nov 2021 15:36:49 +0000
Subject: note 126584 added to function.implode
Groups: php.notes 
Request: Send a blank email to php-notes+get-217197@lists.php.net to get a copy of this message
There is no mention of behavior on a empty array, so I tried it and here's the result: <?php $ar = array(); $result = implode(',', $ar); // Comma arbitrarily applied as the separator $is_result_empty = empty($result); ?> $result: $is_result_empty: 1 In other words, an empty string is the result. ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 74.211.2.163) ---- Manual Page -- https://php.net/manual/en/function.implode.php Edit -- https://main.php.net/note/edit/126584 Del: integrated -- https://main.php.net/note/delete/126584/integrated Del: useless -- https://main.php.net/note/delete/126584/useless Del: bad code -- https://main.php.net/note/delete/126584/bad+code Del: spam -- https://main.php.net/note/delete/126584/spam Del: non-english -- https://main.php.net/note/delete/126584/non-english Del: in docs -- https://main.php.net/note/delete/126584/in+docs Del: other reasons-- https://main.php.net/note/delete/126584 Reject -- https://main.php.net/note/reject/126584 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217197) next »