|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-05-23 15:59 UTC] aharvey@php.net
-Status: Open
+Status: Not a bug
[2014-05-23 15:59 UTC] aharvey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Feb 08 19:00:02 2026 UTC |
Description: ------------ If I pass the optional third parameter in DEFINE method as TRUE, it is allowing me to override the existing value of a constant. This is not the expected behavior as constant's value should not be changed once it is declared. Test script: --------------- define("GREETING", "Hello you.",true); echo GREETING; // outputs "Hello you." echo "before changing the constant value <br/>"; //before changing the constant value define("GREETING", "sample value."); echo GREETING; // outputs "sample value." echo "<br/>"; Expected result: ---------------- constant's value should not be changed once it is declared. Actual result: -------------- it is allowing me to override the existing value of a constant.