Re: Accessing a Char in an Array

From: Date: Mon, 20 Dec 2004 23:24:47 +0000
Subject: Re: Accessing a Char in an Array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-204774@lists.php.net to get a copy of this message
So my question is: What is faster using substr or accessing the string like an array?
I don't know and in this case I don't care. Both syntaxes work fine, but for me the clarity of substr for users not familiar with the array-like construct makes it a better choice. And I have been known to ocassionally debug a script wrong because I thought a string was holding an array :(

« previous php.general (#204774) next »