I am going crazy here. The following simple if-condition does not produce the right output.
$xxx = 1;
if($xxx == 1)
define('DEBUG', true);
else
define('DEBUG', false);
var_dump($xxx);
var_dump(DEBUG);
die();
Output:
int(1)
bool(false)
I see absolutely no reason why the DEBUG constant is not being set to true.
PHP’s type juggling should allow this if-statement. And even if I put an intval in front of the variable, it still produces false as output.
Edit 2:
I copied the exact code from above into a new file and it produces the expected output.
So I don’t know what is going on…
Output :
Your string length is one, and it seems to be empty (a space ?).