3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo urldecode("http://www.office.databay.de/phpconsole/?php=%24a+%3D+true+and+false%3B%0D%0Avar_dump+%28%24a%29%3B%0D%0A%0D%0Aecho+%22%3Chr+%2F%3E%22%3B%0D%0A%24b+%3D+true+%26%26+false%3B%0D%0Avar_dump+%28%24b%29%3B%0D%0Aecho+%22%3Chr+%2F%3E%22%3B%0D%0A%0D%0Afunction+getFalse%28%29%0D%0A%7B%0D%0Areturn+false%3B%0D%0A%7D%0D%0A%0D%0A%24a+%3D+getFalse%28%29+%26%26+true%3B%0D%0Avar_dump+%28%24a%29%3B%0D%0A%0D%0Aecho+%22%3Chr+%2F%3E%22%3B%0D%0A%24b+%3D+getFalse%28%29+and+true%3B%0D%0Avar_dump+%28%24b%29%3B%0D%0A");
Output for 4.3.0 - 7.2.0
http://www.office.databay.de/phpconsole/?php=$a = true and false; var_dump ($a); echo "<hr />"; $b = true && false; var_dump ($b); echo "<hr />"; function getFalse() { return false; } $a = getFalse() && true; var_dump ($a); echo "<hr />"; $b = getFalse() and true; var_dump ($b);