3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function ifTrueAndStringTrueIsTrueReturnStringFalseIfFalseAndStringTrueReturnStringFalseIfTrueAndStringFalseReturnStringTrueIfFalseAndStringTrueReturnStringTrue($bool,$string1,$string2) { if ($bool != false && $string != false) { return "false"; } if ($bool != false && $string != true) { return "false"; } if ($bool != true && $string != false) { return "true"; } if ($bool != true && $string != true) { return "true"; } return "uh oh, it failed"; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0