|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-04 20:10 UTC] helly@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 21:00:01 2025 UTC |
Description: ------------ I think it's better, if the implode() function call the __toString() method of a array width objects. Reproduce code: --------------- class obj{ function __construct($name){ $this->name = $name; } function __toString(){ return $this->name; } } $arry = array(); $arry[] = new obj('first'); $arry[] = new obj('second'); $arry[] = new obj('onemore'); echo implode(', ', $arry); Expected result: ---------------- first, second, onemore Actual result: -------------- Object, Object, Object