Re: [PHP-DEV] 4.0.2 Release From: Eric Peters (egpeters <email protected>)
Date: 08/24/00

I didn't see anything in the bugs.php.net related to a post made on 8/7/00
on

http://www.php.net/manual/function.unset.php

dream <email protected>
07-Aug-2000 04:38
 
Also, for some stupid, stupid reason, when you use unset() on an array, it
not only removes the item but it reduces the index, and not in a way you'd
expect.

For example:

$dope = array("a", "b", "c", "d", "e");
unset($dope[1]);

What *should* happen is the second array item (b) should disappear. What
*does* happen is that $dope[1] is unset, AND the index is reduced, but the
item isn't deleted. So your array now goes "a", (blank), "c", "d". Both
"b" and "e" were lost.

Very annoying.
 

is that proper behavior?

Seems like a bug to me and curious if it ever got fixed - i'm having to
array_splice to delete any values currently

it would be helpfull to know if the 4.0.2 release will include that fix

Thanks

Eric

On Thu, 24 Aug 2000, Andi Gutmans wrote:

> Well for a change the code freeze really seems to be taking place :)
> I think we're pretty much ready to release. We will post 4.0.2-dev Windows
> binaries soon and I think we should be ready to roll 4.0.2 on Monday when
> everyone's back from the weekend.
> Reminder: Don't commit any big patches unless they are bug fixes and you're
> REALLY sure they are correct.
>
> Andi
> ---
> Andi Gutmans <andi <email protected>>
> http://www.zend.com/
>
> --
> 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>
>
>

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