Location: PHPKode > projects > phc > test/subjects/parsing/binops1.php
<?php

# all 4 bit permutations
foreach (range (0, 15) as $a)
{
	foreach (range (0, 15) as $b)
	{
		foreach (range (0, 15) as $c)
		{
			foreach (range (0, 15) as $d)
			{
				# trinary :)
				echo ($a | $b | $c | $d). "\n";
				echo ($a | $b | $c & $d). "\n";
				echo ($a | $b | $c ^ $d). "\n";

				echo ($a | $b & $c | $d). "\n";
				echo ($a | $b & $c & $d). "\n";
				echo ($a | $b & $c ^ $d). "\n";
				
				echo ($a | $b ^ $c | $d). "\n";
				echo ($a | $b ^ $c & $d). "\n";
				echo ($a | $b ^ $c ^ $d). "\n";
			}
		}
	}
}

?>
Return current item: phc