RE: [PHP] Re: PHP Brain Teasers
| From: | Jay Blanchard | Date: | Wed, 27 Jun 2007 14:33:00 +0000 |
| Subject: | RE: [PHP] Re: PHP Brain Teasers | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257868@lists.php.net to get a copy of this message | ||
[snip]
> <?php
>
> function think($i) {
> TRUE == $i ? 'self-aware' : 'cow';
> $return($x);
> }
>
> ?>
I'd hazard a guess at "I think therefore I am", but looking at it it
seems more like...
If I think then I'm self-aware otherwise I'm a cow, but regardless
of my thinking I'm nothing.
[/snip]
Yep, the problem was that if I coded this;
<?php
function think($i) {
TRUE == $i ? 'am' : 'am not';
$return($i);
}
?>
Would have been a dead giveaway, no?