Re: Re: Negative string offset support

From: Date: Mon, 01 Nov 2004 17:11:42 +0000
Subject: Re: Re: Negative string offset support
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  Groups: php.internals 
Request: Send a blank email to internals+get-13673@lists.php.net to get a copy of this message
>> Substr_replace() for the purpose of changing one char is like using a >> tank for a fly swatter, it may work but it is extremely inefficient. >> > the example wasn't clear but I stated with substr_replace() there is no > need > for ranges in {}. > I like {$s,$l} and/or {$s:$e} for read, but I can see using that kinda syntax for write getting REALLY messy. So: -1 on write acces using {,} or {:} and if it doesn't work for write then making it work for read is inconsistent so -1 on the whole concept. Still +1 on $str{$negOffset} though, speed aside, it's readable and cute. -Sara

« previous php.internals (#13673) next »