note 52376 added to function.implode
| From: | AndyMorris at osu1 dot php dot net | Date: | Fri, 29 Apr 2005 00:27:59 +0000 |
| Subject: | note 52376 added to function.implode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88722@lists.php.net to get a copy of this message | ||
It's always dangerous to give sweeping statements like "this will always work!". Your
solution is much more elegant than mine, but perhaps it's a little too elegant for its own
good! Try giving it an array with zero or one elements in it for example. You could say that folks
shouldn't call it in that case, but you know folks... they like pushing the boundaries. :-)
Perhaps you meant to say that the array can be altered inside the function because it is passed
"by value" rather than "by reference", or is that just a mixture of terminology
from my C++ upbringing? Passing by reference would imply that you could alter the array inside the
function and have that alter its value outside. Passing by value implies that any changes inside the
function affect the local function copy only. In PHP, the latter is clearly the case, unless a
variable is explicitly declared as global.
OK, that's my 2c.
----
Manual Page -- http://www.php.net/manual/en/function.implode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52376
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52376&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52376&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52376&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52376&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52376&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52376&report=yes
Search -- http://master.php.net/manage/user-notes.php