boolean - PHP Switch True / False constant values -
is there way switch defined constant values of true / false in php? trying make true = false , false = true.
i've tried several attempts not seem allow me change:
define("false",1); define(false,1); false = true;
the final 1 results in php internal server error, first 2 nothing.
none of these seem work. true / false defined somewhere deeper within compiled php cannot re-set?
note: educational purposes , understand how these values defined, since appears "untouchable". not trying write blasphemous code checks things in reverse.
you can't it, can write true
, false. way, work use constant()
if defined both constants, e.g.
define(false, true); define(true, false); var_dump(constant(true));
output:
bool(false)
Comments
Post a Comment