A PHP Puzzle

Here’s an amusing little puzzle for those of you visiting my site who also happen to know a little PHP. I came up with this myself, during some short span of time when I wasn’t working on my novel or working at my paying job. Look at the PHP code below and determine what it will write as output. I tested the code on a 5.3 server, but I believe it will produce the same output on more recent versions of PHP.

If you get the right answer, don’t post it in the comments. Instead, post the first name of your favorite actor associated with the answer, and I’ll know you got it. If you can get the answer without running the code or looking at a reference book, then you get extra points. The points aren’t worth any more than the points on Whose Line Is It Anyway?, but they’re yours if you earn them, and you can do whatever you want with them. 🙂

The Puzzle Code

if ((1 == TRUE) && (1 !== TRUE)) {
	$x = 0;
} else {
	$x = 1;
$x.=$x. ((1 . 0) - (3.0));
echo $x;

Thanks for coming by my little corner of the webiverse.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑