because == wasn't equal enough.
I think I found why it was evaluating to true if it wasn't defined in one of the comments in the PHP Manual:
https://www.php.net/manual/en/function.define.php
Be aware that if "Notice"-level error reporting is turned off, then trying to use a constant
as a variable will result in it being interpreted as a string, if it has not been defined.
I was working on a program which included a config file which contained:
<?php
define('ENABLE_UPLOADS', true);
?>
Since I wanted to remove the ability for uploads, I changed the file to read:
<?php
//define('ENABLE_UPLOADS', true);
?>
However, to my surprise, the program was still allowing uploads. Digging deeper into the code,
I discovered this:
<?php
if ( ENABLE_UPLOADS ):
?>
Since 'ENABLE_UPLOADS' was not defined as a constant, PHP was interpreting its use as a string
constant, which of course evaluates as True.
Yikes. haha