Re: cvs: php4 /ext/standard array.c
| From: | Jeroen van Wolffelaar | Date: | Fri, 05 Oct 2001 21:40:02 +0000 |
| Subject: | Re: cvs: php4 /ext/standard array.c | ||
| References: | 1 2 3 4 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-7680@lists.php.net to get a copy of this message | ||
So they don't dupe.
Okay, then it's solved, but only the problem of returning at once or not
isn't clarified, can the original author explain why it is decided to search
the whole array in stead of getting the first occurence?
--Jeroen
----- Original Message -----
From: "Zak Greant" <jag@nucleus.com>
To: "Jeroen van Wolffelaar" <jeroen@A-Eskwadraat.nl>
Cc: <php-cvs@lists.php.net>
Sent: Friday, October 05, 2001 11:38 PM
Subject: Re: [PHP-CVS] cvs: php4 /ext/standard array.c
> On October 5, 2001 03:35 pm, Jeroen van Wolffelaar wrote:
> > > Then this should be the correct fix. String is duped in
> > > zend_hash_get_current_key_ex so no need for that in RETURN_STRINGL.
> > > Right?
> >
> > Are you sure the string is duped there?
> >
> > And STRINGL and STRING differ in wether or not specifying length
> > paramter, both versions have a 'dup' flag, so it should be STINGL
> > anyway, but wether dup should be 0 or 1 I'm not sure.
> >
> > I can't believe zend_hash_get_current_key_ex dups the string, because
> > it would be extremely bad for performance, since it isn't needed in
> > 99.9% of the cases. So I guess duplicating IS needed.
>
> Coincidentally, I was just reading the Zend API docs about this a few
> days ago:
>
> Here is a relevant passage:
> We've only discussed the so-called *_ex() API so far. You may have
> noticed that the API functions we've used are called
> zend_get_parameters_ex() instead of zend_get_parameters(),
> convert_to_long_ex() instead of convert_to_long(), etc. The *_ex()
> functions form the so-called new "extended" Zend API. They give a
> minor speed increase over the old API, but as a tradeoff are only
> meant for providing read-only access. ...
>
> More at http://www.zend.com/apidoc/x1084.php
>
> Cheers!
>
> --zak
>
>