|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-11-19 16:00 UTC] k_radek at yahoo dot pl
Description: ------------ Last paremeter defined in a function says that you can define constant with case-insensitive option but says nothing about that it allows you to REDEFINE constant... Reproduce code: --------------- --- From manual page: function.define#Parameters --- "If set to TRUE, the constant will be defined case-insensitive. The default behavior is case-sensitive; i.e. CONSTANT and Constant represent different values." Expected result: ---------------- "If set to TRUE, the constant will be defined case-insensitive. The default behavior is case-sensitive; i.e. CONSTANT and Constant represent different values. It allows you to redefine constant." Actual result: -------------- "If set to TRUE, the constant will be defined case-insensitive. The default behavior is case-sensitive; i.e. CONSTANT and Constant represent different values." PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Mar 21 05:00:01 2026 UTC |
Actually, I cannot reproduce this. You are probably talking about something like this: <?php define("fOo", "bar", 0); var_dump(fOo); define("FOO", "foobar", 1); var_dump(fOo, foo); ?> Note that "fOo" still references the original "bar", while any other variations of "foo" reference the latter, case-insensitive declaration. Thats expected behavior.