[PHP-DEV] Re: Bug #1629 Updated: for x undefined values in an array, implode concatenates the last x + 1 items From: Ben Gunter (bgunter <email protected>)
Date: 06/30/99

I don't understand how you can see no problem with it. It clearly
screws up when there are unassigned values in the array. If there's an
unassigned value in the array sent to implode(), it concatenates the
last two values in the array *without* the delimiting string specified.
If there are two unassigned values, it concatenates the last three. If
there are four, the last five. And so on...

I installed this thing directly from the PHP RPM on the RedHat 6.0
distribution. For a very simple example of the output I'm seeing (and
the source that outputs it), see http://amazon.randombytes.com/tt.php3
. As far as I know, the "stucktogether" that you see is *not* supposed
to be stuck together. If this is what I'm supposed to expect from the
implode() function, then I apparently severely misunderstood its
purpose. I expected it to behave like join() in Perl.

If, after seeing this run on my machine, you still think I don't know
what I'm talking about, by all means enlighten me. This is driving me
nuts. I've done a work-around already, but I hate to see a bug that
nobody else sees.

Thank you.

Bug Database wrote:
>
> ID: 1629
> Updated by: jim
> Reported By: codemaster <email protected>
> Status: Analyzed
> Bug Type: Misbehaving function
> Assigned To:
> Comments:
>
> And the bug is? What is being output versus what you expect to see?
>
> It's hard to make much sense of your example, and the output looks
>
> reasonable to me.
>
> Full Bug description available at: http://bugs.php.net/?id=1629

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Benjamin Gunter
Programmer / System Administrator
RandomBytes
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

-- PHP Development Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>