|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-11-30 10:38 UTC] derick@php.net
[2010-11-24 10:51 UTC] jani@php.net
-Package: Feature/Change Request
+Package: Scripting Engine problem
[2012-03-28 08:40 UTC] php dot net at doppy dot nl
[2012-03-28 08:43 UTC] php dot net at doppy dot nl
[2018-03-10 14:50 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2018-03-10 14:50 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 20:00:01 2025 UTC |
Description: ------------ when using undefined constant, PHP consider name of constant to be string. when using this constant in if () or anywhere else, string value is cast as TRUE, which could confuse developer Reproduce code: --------------- // define('MY_DEFINED_CONSTANT', FALSE); if (MY_DEFINED_CONSTANT) { echo 'value of constant is TRUE'; } else { echo 'value of constant is FALSE'; } Expected result: ---------------- * error or at least warning, that we are using undefined constant * Actual result: -------------- value of constant is TRUE