Re: AW: AW: AW: [PHP-DEV] arrays

From: Date: Tue, 15 May 2001 01:16:14 +0000
Subject: Re: AW: AW: AW: [PHP-DEV] arrays
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-55272@lists.php.net to get a copy of this message
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:zeev@zend.com] Gesendet: Dienstag, 15. Mai 2001 01:52 An: Harald Radi Cc: Stig Sæther Bakken; Andrei Zmievski; php-dev@lists.php.net 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 <zeev@zend.com>]
Why do you need it? Nobody ever needed it until now.
.. it seems noone dared to complain until now .. :)
-- Zeev Suraski <zeev@zend.com> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/


« previous php.dev (#55272) next »