Quote:
Originally Posted by borked
echo ($sands == 'cool' ? 'Yaaay' : 'Boooo!');
|
I love abusing ternary, too.
Code:
<?php
define('RAD', TRUE);
define('BOGUS', FALSE);
define('DUDE', '');
define('NOWAY', 'Fucknaw.');
define('TOTALLY', 'Furshure.');
define('BEDAT', '==');
echo ( DUDE . $sands . BEDAT . RAD . DUDE ? TOTALLY . DUDE : NOWAY . DUDE) ."\n";
?>