Harald Radi wrote:
> instead of just setting a flag you could implement a assoc-entry counter
> (imo performance is the same)
> that you could decrement if an associative key gets deleted.
>
This, to me, seems like too much work for to small a feature... Even
though extensions might benefit from this feature, its easy enough to
implement in the extensions themselves and won't improve speed (and on a
technical note, the above method seems as if it would a little bit
slower (larger container, more operations, yada, yada, yada).
If its really necessary, the best (even though most inefficient, but it
wouldn't require a re-working of the internals) solution would be just
to have a function, zend_is_assoc_array(), which returns true if the
given hash is an associative array, false otherwise.
As for the other solution, the userland function, array_remove_assoc(),
just seems wayyyyyy to hacky for me, and really pushing it for such a
small feature.
-Sterling
> harald.
>
>
>>-----Ursprüngliche Nachricht-----
>>Von: Zeev Suraski [mailto:[EMAIL PROTECTED]]
>>Gesendet: Dienstag, 15. Mai 2001 01:52
>>An: Harald Radi
>>Cc: Stig Sæther Bakken; Andrei Zmievski; [EMAIL PROTECTED]
>>Betreff: Re: AW: AW: [PHP-DEV] arrays
>>
>>
>>Ok, if we humor ourselves with this feature... What kind of
>>behavior would
>>you expect if a key gets deleted, and there are no longer associative
>>members in the array?
>>
>>Zeev
>>
>>At 02:42 15/5/2001, Harald Radi wrote:
>>
>>>>Any XML-RPC implementation would benefit from seeing easily whether a
>>>>value is a continous pure numeric array, associative array or a mix.
>>>>It should be a trivial fix, and the performance difference is
>>>>negligible.
>>>>
>>>> - Stig
>>>>
>>>>[Zeev Suraski <[EMAIL PROTECTED]>]
>>>>
>>>>>Why do you need it? Nobody ever needed it until now.
>>>>>
>>>.. it seems noone dared to complain until now .. :)
>>>
>>--
>>Zeev Suraski <[EMAIL PROTECTED]>
>>CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/
>>
>>
>>
>
>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]