|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2015-02-09 16:17 UTC] ajf at ajf dot me
Description: ------------ Compare: http://3v4l.org/t6RG1 http://3v4l.org/6nmGV Test script: --------------- <?php Class A { const A = ['a']; } var_dump(A::{'A'}); Expected result: ---------------- Fatal error: Arrays are not allowed in class constants in %s on line %d Actual result: -------------- Fatal error: Arrays are not allowed in class constants in /in/t6RG1 on line 3 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Er, the expected result was supposed to be this: array(1) { [0]=> string(1) "a" } Sorry about that....actually, I'm not sure A::{'A'} was ever valid syntax. I make mistakes, ignore me.Closing as "not a bug" since A::{'B'} was never supported, my bad.