Skip to main content

PHP’s “doggie” easter egg

By Kevin Yank

Programming

Share:

Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

(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 is an accomplished web developer, speaker, trainer and author of Build Your Own Database Driven Website Using PHP & MySQL and Co-Author of Simply JavaScript and Everything You Know About CSS is Wrong! Kevin loves to share his wealth of knowledge and it didn't stop at books, he's also the course instructor to 3 online courses in web development. Currently Kevin is the Director of Front End Engineering at Culture Amp.

New books out now!

Learn valuable skills with a practical introduction to Python programming!


Give yourself more options and write higher quality CSS with CSS Optimization Basics.