Re: A little confusing thing on (mistakenly) geting a offset fromstring with multi dim index.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rain Lee wrote:

> I think the convert that cause the 'key' become 0 is ... not a good
> idea. But my experience on PHP is so little, maybe there is some
> reason for it that i never know.

I have to agree that this behavior is somewhat unexpected.  However, it
seems to fit well to PHP's type juggling, which generally takes getting
used to.  And of course you can get around this behavior by making sure
you have an array and not a string; consider making use of type hinting[1].

> Don't know what's the opinion of those guys inside the PHP.

Me neither.  You might consider filing a feature request[2] or asking on
php.internals[3].

[1] <http://www.php.net/manual/en/language.oop5.typehinting.php>
[2] <https://bugs.php.net/>
[3] <news://news.php.net/php.internals>

-- 
Christoph M. Becker




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux