3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function b($t,$s) { echo '[' . $s . ':' .($t ? 'true' : 'false') . ']'; return $t; } b((b(true,1) && b(false,2)) || b(false,3),4); echo "\n"; b((b(true,1) && b(true, 2)) || b(false,3),4); echo "\n"; b((b(false,1) && b(true,2)) || b(true,3),4);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
[1:true][2:false][3:false][4:false] [1:true][2:true][4:true] [1:false][3:true][4:true]