Ilia Alshanetsky wrote:
Derick Rethans wrote:
How can you *need* this, you can use substr() just fine.
Almost no peace of functionality in PHP in unique, some extensions
duplicate core/standard functionality and vice versa. Usually the "core"
offers a simpler access to a resource and full pledged extensions gives
the full capabilities. The best example of this is streams, sockets
extension and cURL.
On a similar note, most users don't use even 1/2 the functionality PHP
offers, does it mean we should remove those parts of the language or not
have add them in the 1st place?
Just because substr() or $a[strlen($a) - 1] would work, it does not
mean they are the most optimal approaches. The change to permit negative
string offsets would require @ most 2-3 line change in Zend and it would
be trivial to write a series of tests to cover the affected code. We are
not talking about a major change here.
Ilia
Privet Ilia,
Andy mentioned that he tried in the past to separate {} and [] but after
some unsuccess he left the idea of separating. So, the patch definitely
won't be 2-3 lines of code.
There are a lot of people which don't know about negative offsets at all,
and use strlen() for calculations. Moving this feature to the language
itself won't help them that much if just don't read the documentation (
as they do).
Andrey
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php