php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #2272 implode() glues string to one-element-arrays
Submitted: 1999-09-09 14:25 UTC Modified: 2000-08-23 19:10 UTC
From: skra0063 at rz dot uni-hildesheim dot de Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0.12 OS: Solaris 5.7
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: skra0063 at rz dot uni-hildesheim dot de
New email:
PHP Version: OS:

 

 [1999-09-09 14:25 UTC] skra0063 at rz dot uni-hildesheim dot de
if you use the implode()-function on an array with only one element in it, the glue string is appended to the name of the only element, anyway. i could not think of any situation where this could be helpful since the glue string is not appended to the last element of a more-that-one-element-array, either.
i, for example, use it to build a mysql-query where the glue string is "or (row-name)="; of course, mysql reports an error if it encounters something like "...=" with nothing behind the "=".
sure, one can easily work around this with an if-construct, but i think it would make more sense if, in the case described, the glue string were not appeneded to the result.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-23 19:10 UTC] hholzgra@php.net
seems to be fixed in 3.0.16 and 4.0.1
 [2017-01-18 19:14 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=341683
Log: PR #2272 dns_get_record CAA documentation
 [2017-01-19 05:19 UTC] krakjoe@php.net
Automatic comment from SVN on behalf of krakjoe
Revision: http://svn.php.net/viewvc/?view=revision&revision=341688
Log: changelog for PR #2272
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 17:01:28 2025 UTC