Re: Negative string offsets
| From: | Stas Malyshev | Date: | Mon, 20 Jun 2011 16:38:51 +0000 |
| Subject: | Re: Negative string offsets | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53425@lists.php.net to get a copy of this message | ||
Hi!
Negative string offsets is a wish and also an implementation of my running PHP version for long. It operates in the same fashion like substr() with negative offsets, but avoids the function call and is much smarter if one single character has to be extracted: $str = "Hallo";Sounds OK, but what would happen if I do $str[-10] = '?'; ?
Would be glad to see this in 5.4For that you'll need RFC with attached patch ready quite soon. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227