|
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 [email protected])50816-2.diff (last revision 2011-07-29 14:30 UTC by [email protected]) 50816.diff (last revision 2011-07-29 00:54 UTC by [email protected]) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-01-22 13:45 UTC] [email protected]
[2011-07-29 00:54 UTC] [email protected]
[2011-07-29 04:14 UTC] [email protected]
[2011-07-29 14:30 UTC] [email protected]
[2011-07-29 14:32 UTC] [email protected]
[2011-07-29 17:44 UTC] [email protected]
-Assigned To:
+Assigned To: dmitry
[2011-07-30 15:24 UTC] [email protected]
[2011-07-30 15:41 UTC] [email protected]
[2011-07-30 16:06 UTC] [email protected]
[2011-07-30 16:37 UTC] [email protected]
[2011-08-01 11:21 UTC] [email protected]
[2011-08-01 11:21 UTC] [email protected]
-Status: Verified
+Status: Closed
[2011-08-01 11:21 UTC] [email protected]
[2012-04-18 09:49 UTC] [email protected]
[2012-07-24 23:40 UTC] [email protected]
[2013-11-17 09:37 UTC] [email protected]
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 31 03: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" }