* Thus wrote Justin Palmer:
> Why is substr all over the board in how fast it processes the same
> string? Is it the server?
Benchmarking can be a funny thing. Usually benchmarks take an
average of serveral thousand iterations in order to find the
average time it take something to do.
Benchmarki
l; 'Curt Zirzow'
> Subject: Re: FW: [PHP] Accessing a Char in an Array
>
>
> On Tue, 2004-12-21 at 23:47, Justin Palmer wrote:
> > *Sorry Curt for sending this to you.*
> >
> > Hi,
> >
> > Well if any one is interested in the speed I set up
On Tue, 2004-12-21 at 23:47, Justin Palmer wrote:
> *Sorry Curt for sending this to you.*
>
> Hi,
>
> Well if any one is interested in the speed I set up an example that you
> can go to. Though, when I run the example substr() is very neurotic (or
> it seems that it is to me). It can process the
ber 20, 2004 7:27 PM
> To: 'PHP General'
> Subject: Re: [PHP] Accessing a Char in an Array
>
>
> * Thus wrote Justin Palmer:
> > In an earlier thread labeled "first letter", it was suggested that
> > substr() be used.
>
> Just for the record t
* Thus wrote Justin Palmer:
> In an earlier thread labeled "first letter", it was suggested that
> substr() be used.
Just for the record the usage of
$str = 'a string';
$str[0];
Is strongly discouraged, it is recommended to use:
$str{0};
See Section (String access and modification by ch
In an earlier thread labeled "first letter", it was suggested that
substr() be used.
>Check this out... http://us2.php.net/manual/en/function.substr.php.
So my question is:
What is faster using substr or accessing the string like an array?
I know I could test this myself, but I thought someone
6 matches
Mail list logo