Programming
Article

PHP’s “doggie” easter egg

By Kevin Yank

(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.

Kevin Yank
Meet the author
Kevin began developing for the Web in 1995 and is a highly respected technical author. Kev is a world-renowned author, speaker and JavaScript expert. He has a passion for making web technology easy to understand by anyone. Yes, even you!

Recommended

Learn Coding Online
Learn Web Development

Start learning web development and design for free with SitePoint Premium!

Get the latest in Front-end, once a week, for free.