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;
$str[0] == H
$str[-1]
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
Hi,
2011/6/20 Robert Eisele rob...@xarg.org
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 der...@php.net 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
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
+1, seems useful.
On Mon, Jun 20, 2011 at 8:02 AM, Robert Eisele rob...@xarg.org 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
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
single
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 is
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 johan...@schlueters.de
On Mon,
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. So
2011/6/20 Johannes Schlüter johan...@schlueters.de
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
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
2011/6/20 Stas Malyshev smalys...@sugarcrm.com
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
13 matches
Mail list logo