|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-03-06 08:24 UTC] stas@php.net
[2010-03-31 12:22 UTC] info at fedushin dot ru
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 11:00:02 2025 UTC |
<? $myarray['105'] = 'Hello'; $myarray[(string)'106'] = 'Goodbye'; var_dump($myarray); ?> array(2) { [105]=> string(5) "Hello" [106]=> string(7) "Goodbye" } It shouldn't be auto-converting array keys to numbers if they're already of a different type! Let's say I have an whole list of items as my array keys, and one just happens to be "able" to be converted into a number. Suddenly one of my array keys is no longer a string.