On Mon, 20 Jun 2011 18:27:48 +0200, Robert Eisele wrote:
> 2011/6/20 Johannes Schlüter
>> Yes. So having this in the current form accepted means that
>>
>>$a[-1];
>>
>> can have two meanings:
>>
>>1) Get the last item (byte in a string)
>>2) Get item `-1` (in an array)
>>
>
> Yes, s
2011/6/20 Stas Malyshev
> 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 extr
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, bu
2011/6/20 Johannes Schlüter
> On Mon, 2011-06-20 at 17:49 +0200, Robert Eisele wrote:
> > I would not consider this for arrays and objects, too. If we had real
> > arrays, this would make sense but they are HT's and therewith it can also
> be
> > explained that -1 is an element and not the end of
On Mon, 2011-06-20 at 17:49 +0200, Robert Eisele wrote:
> I would not consider this for arrays and objects, too. If we had real
> arrays, this would make sense but they are HT's and therewith it can also be
> explained that -1 is an element and not the end of the chained list behind
> the HT.
Yes.
I would not consider this for arrays and objects, too. If we had real
arrays, this would make sense but they are HT's and therewith it can also be
explained that -1 is an element and not the end of the chained list behind
the HT.
2011/6/20 Johannes Schlüter
> On Mon, 2011-06-20 at 16:31 +0200, E
I would push this out in two steps. First: Negative string offset and later
range/slice
support for objects and strings. Objects would need a new magic method,
e.g. "__slice()",strings need a substr() like interface. I think both are
accessed the
same way, but way are different. The slice support i
On Mon, 2011-06-20 at 16:31 +0200, Etienne Kneuss wrote:
> >> 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
> >>
+1, seems useful.
On Mon, Jun 20, 2011 at 8:02 AM, Robert Eisele wrote:
> 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 o
On 20.06.2011 14:02, Robert Eisele wrote:
> 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
Hi,
On Mon, Jun 20, 2011 at 14:05, Derick Rethans wrote:
> On Mon, 20 Jun 2011, Robert Eisele wrote:
>
>> 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 func
Hi,
2011/6/20 Robert Eisele
> 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:
On Mon, 20 Jun 2011, Robert Eisele wrote:
> 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
13 matches
Mail list logo