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 :(


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to