PHP’s “doggie” easter egg

Tweet

(Via digg) An apparent easter egg in some versions of PHP will display a picture of a dog when any PHP script is loaded with a particular query string.

Try it here on SitePoint:

http://www.sitepoint.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

It appears that different PHP versions have different animals embedded in them:

http://diggnation.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://nadnerb.org/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

Apparently the doggie also appears on the page generated by phpinfo() on April 1st every year.

This has been around awhile, but it’s news to me.

Some other query strings to try:

http://www.sitepoint.com/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42
http://www.sitepoint.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://www.sitepoint.com/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42
http://www.sitepoint.com/?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000

If you’re concerned about the security implications of revealing your PHP version to the masses, be sure to disable the expose_php option in your php.ini file, which also makes this easter egg go away.

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.