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

Something is clearly wrong with your installation of PHP. It could
be because it is an old version (try downloading the latest from
www.php.net), or it could be that there is something wrong with the
RPM package (use the source distribution).

Providing a script and saying "it is broken" is not nearly as useful
as providing a script and saying "the output I see is X, but I expect
to see Y", particularly when that script is 58 lines long. And when
it really is a bug that only you are seeing.

Jim

Ben Gunter wrote:
>
> 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

-- 
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>