There are some odd functions hidden in PHP. One of them is the decbin function, which makes it easy to convert between decimal and binary numbers.

If you’re bore don a rain day, you could use this function to make a simple binary clock, here’s a few lines to get you started:

1
2
3
echo "Hours: ".decbin(date("H"))."";
echo " Minutes:".decbin(date("i")).";
echo " Seconds:".decbin(date("s"));

See the binary clock output (and the source of the page).