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:

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

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:

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.



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.