On Thu, Nov 24, 2011 at 10:44 PM, Yasuo Ohgaki <yohg...@ohgaki.net> wrote:

> Hi all,
>
> I should think twice before seding mail. "abc" as array index is
> converted to 0 since it's not a integer. So with current code is
> behave consistently with regards to string to long conversion.
>
> However,
>
> PHP 5.3
> php -r '$s = "abc"; var_dump($s[0]["bar"]);'
> PHP Fatal error:  Cannot use string offset as an array in Command line
> code on line 1
>
> PHP 5.4
> ./php -r '$s = "abc"; var_dump($s[0]["bar"]);'
> string(1) "a"
>
> Isn't it better to raise notice for accessing string by string index?
> There is no use to allowing string index access to strings. I think
> raising notice is feasible. Isn't it?


agree, and I also suggested adding this notice.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

Reply via email to