I just tried this:
$a = true; echo ($a == 1 && $a == 2 && $a == 3);
and he repeated 1 .
Due to type checking, not type checking, 1, 2, 3 will be considered true compared to a boolean value.
Editing Reply: No, this cannot be done.
Hackish method , which @FrankerZ commented:
Zero Byte Character = 0xFEFF
http://shapecatcher.com/unicode/info/65279
http://www.unicodemap.org/details/0xFEFF/index.html
$var = "1"; $var = "2"; $ var = "3"; echo ($var === "1" && $var === "2" && $ var === "3") ? "true" : "false";
This code works with this symbol, because the name $ var and $var appears to be valid for the PHP compiler and with a suitable font, it can be hidden. This can be achieved with Alt + 6 5 2 7 9 on Windows.
source share