View Single Post

  #6 (permalink)  
Old 07-13-2003
Louis-Philippe Huberdeau
 
Posts: n/a
Default Re: Upgrade to PHP5 (beta)

Honestly, I never heard of that modification and have been following the
development for quite a while... and my square brackets still work just
fine.

Don't worry about that, chances they modify that part are very low. They
don't want to remove case insensitivity because it would cause
incompatibility issues, I can't even think of the disaster it would make
if they would change the array element symbol. It's about the most used
syntax of the entire language... except maybe the PHP tags.

Agelmar wrote:
> "Keith Maika" <slick@aoeex.com> wrote in message
> news:vh11pgc5evdf0d@corp.supernews.com...
>
>>Agelmar wrote:
>>
>>>Louis-Philippe Huberdeau wrote:
>>>

>>
>>...
>>
>>>I seem to recall that they were proposing eliminating indexing into a

>
> string
>
>>>via $somestring[$index], going for instead $somestring{$index} or

>
> something
>
>>>of that nature. Do you recall if that was implemented?
>>>
>>>// Ian
>>>
>>>

>>
>>That has been done for a long time. Maybe they are finally going to
>>remove support for $something[$index] but it's been in the manual for
>>quite some time that they do not want you do use that syntax, and rather
>>$something{$index} should be used.

>
>
> Hmm... personally, I much prefer $something[$index] as it's closer to C, and
> just feels more natural :-) No idea why they changed it $string{$index}
> just feels like a concatenation of $string and $index... I mean come on,
> you're indexing into the string, why drop the array subscripting? gah...
>
>
>


Reply With Quote