RE: FW: [PHP] Accessing a Char in an Array
| From: | Robert Cummings | Date: | Wed, 22 Dec 2004 05:44:34 +0000 |
| Subject: | RE: FW: [PHP] Accessing a Char in an Array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-204941@lists.php.net to get a copy of this message | ||
On Tue, 2004-12-21 at 23:57, Justin Palmer wrote:
> Why is substr all over the board in how fast it processes the same
> string? Is it the server?
I'm not sure I understand the question with respect to "Is it the
server?". Could you ellaborate?
I think many people are just more familiar with substr() and so it's
their vice of choice for retrieving a character from a string. It most
definitely is not faster than an operator though.
Similarly it is never wise to use is_null() when you can use === null.
Although I believe is_null() existed long before the === operator and so
is in wide use still.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com
|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'