Reply to Re: [PHP] Re: Illegal string offset error in array

Your name:

Reply:


Posted by Rasmus Lerdorf on 03/28/05 03:33

Jasper Bryant-Greene wrote:
> Rasmus Lerdorf wrote:
>
>>>> Jasper Bryant-Greene wrote:
>>>>
>>>>> You can't access string offsets with square brackets [] in PHP5.
>>>>> You need to use curly braces {} instead.
>>>>
>>>>
>>>> Not sure where you got that idea. This is not true.
>>>>
>>>> -Rasmus
>>>
>>>
>>> Actually, it is. See the following URL:
>>>
>>> http://www.php.net/manual/en/language.types.string.php#language.types.string.substr
>>
>>
>>
>> Yes, please read that link again. The syntax is deprecated. That
>> doesn't mean it doesn't work as you indicated. If we broke this most
>> of the scripts written for PHP4 would break.
>>
>> -Rasmus
>
>
> Yes, but he's talking about PHP5. He probably has E_STRICT on, which is
> why he's getting that error.
>
> I was telling him to use the correct syntax, which will cause him to not
> get that error.

I know we are talking about PHP5, and that syntax does not throw an
E_STRICT error.

-Rasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация