<?php
$P = true;
$Q = true;
$cond = ($P xor $Q);
echo 'P is '.stringify($P)."\n";
echo 'Q is '.stringify($Q)."\n";
echo 'P xor Q is '.stringify($cond)."\n";
function stringify($bool)
{
if ($bool) {
return 'true';
}
return 'false';
}
PD9waHAKIAokUCA9IHRydWU7CiRRID0gdHJ1ZTsKIAokY29uZCA9ICgkUCB4b3IgJFEpOwogCmVjaG8gJ1AgaXMgJy5zdHJpbmdpZnkoJFApLiJcbiI7CmVjaG8gJ1EgaXMgJy5zdHJpbmdpZnkoJFEpLiJcbiI7CmVjaG8gJ1AgeG9yIFEgaXMgJy5zdHJpbmdpZnkoJGNvbmQpLiJcbiI7CiAKIApmdW5jdGlvbiBzdHJpbmdpZnkoJGJvb2wpCnsKCWlmICgkYm9vbCkgewoJCXJldHVybiAndHJ1ZSc7Cgl9CiAKCXJldHVybiAnZmFsc2UnOwp9