On Mon, 2008-06-16 at 09:20 +0300, Arvids Godjuks wrote: > 2008/6/14 Chris Stockton <[EMAIL PROTECTED]>: > > > > > I personally have always used {} for string offsets because it just felt > > right. [] seems like it is for arrays, for me, using it on strings makes me > > feel dirty. > > > > Could we maybe visit some of the ideas you have had with {} syntax offering > > some benefit? That I do not completely understand and would be nice to know > > what you mean. > > > > Maybe something like built in substr? since it wouldn't break existing use > > of {}, tough thing is the ambiguity between {1} regular and {1} substr, > > dunno: > > $str = "abcdef"; > > $result = $str{1}; // returns b, but substr would be something like bcdef > > $result = $str{1, 2} // returns bc, this we know what to return for sure > > $result = $str{1,} // maybe to make up for lack of {1} returning remaining > > portion, its a little ugly almost feels like a syntax error > > > > Just trying to figure out how you could have technical benefit with it, > > maybe you just meant performance optimization or something. > > > > -Chris > > > > String is an array of chars, always was and is such in any programming > language. So I see argument for {} as missing knowledge for some programming > basics. > > And I don't understand why are you arguing on this. This was decided for > removal long ago - so just do it.
You must have skipped some of the messages in this thread... such as the following one: http://marc.info/?l=php-internals&m=121315757406465&w=2 Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php