|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
Patchesbug50816.patch (last revision 2011-07-30 16:06 UTC by laruence@php.net)50816-2.diff (last revision 2011-07-29 14:30 UTC by pierrick@php.net) 50816.diff (last revision 2011-07-29 00:54 UTC by pierrick@php.net) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-01-22 13:45 UTC] jani@php.net
[2011-07-29 00:54 UTC] pierrick@php.net
[2011-07-29 04:14 UTC] pierrick@php.net
[2011-07-29 14:30 UTC] pierrick@php.net
[2011-07-29 14:32 UTC] pierrick@php.net
[2011-07-29 17:44 UTC] pierrick@php.net
-Assigned To:
+Assigned To: dmitry
[2011-07-30 15:24 UTC] laruence@php.net
[2011-07-30 15:41 UTC] laruence@php.net
[2011-07-30 16:06 UTC] laruence@php.net
[2011-07-30 16:37 UTC] laruence@php.net
[2011-08-01 11:21 UTC] dmitry@php.net
[2011-08-01 11:21 UTC] dmitry@php.net
-Status: Verified
+Status: Closed
[2011-08-01 11:21 UTC] dmitry@php.net
[2012-04-18 09:49 UTC] laruence@php.net
[2012-07-24 23:40 UTC] rasmus@php.net
[2013-11-17 09:37 UTC] laruence@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
Description: ------------ Some lines of code is worth a thousand words Reproduce code: --------------- class Foo { const ONE = 1; const TWO = 1; public static $mapWithConst = array(self::ONE => 'one', self::TWO => 'two',); public static $mapWithoutConst = array(17 => 'one', 17 => 'two',); } $mapWithConst = array(1 => 'one', 1 => 'two',); $mapWithoutConst = array(Foo::ONE => 'one', Foo::TWO => 'two',); var_dump(Foo::$mapWithConst); var_dump(Foo::$mapWithoutConst); var_dump($mapWithConst); var_dump($mapWithoutConst); Expected result: ---------------- array(1) { [1]=> string(3) "two" } array(1) { [17]=> string(3) "two" } array(1) { [1]=> string(3) "two" } array(1) { [1]=> string(3) "two" } Actual result: -------------- array(1) { [1]=> string(3) "one" // ??? } array(1) { [17]=> string(3) "two" } array(1) { [1]=> string(3) "two" } array(1) { [1]=> string(3) "two" }