PHP’s “doggie” easter egg

By | | PHP

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

Written By:

Kevin Yank

Kevin began developing for the Web in 1995 and is a highly respected technical author. He wrote Build your own Database Driven Website using PHP and MySQL, a practical step-by-step guide published by SitePoint, and he's co-author of the SitePoint Tech Times, a bi-weekly newsletter for technically-minded web developers. Kev believes that any good webmaster should have seen at least one episode of MacGyver.

Website
>> More Posts By Kevin Yank

 

No related posts.

{ 10 comments }

Damo February 4, 2006 at 1:04 am

God damn. You’re losing respect for PHP because of an eater egg? Please, don’t overreact or anything.

Sy Ali January 28, 2006 at 3:44 am

Well that’s just stupid. Oh look at that.. it’s my respect for PHP continuing to trickle away.

Young Twig January 11, 2006 at 5:02 pm

wtf.

Etnu January 11, 2006 at 3:32 am

Rasmus explanation is that originally he needed bake the PHP logo into the phpinfo script (since external file dependencies are a PITA). The query strings were made because some people have a sense of humor. Virtually every modern development tool has things like that. get over it.

Dean C January 10, 2006 at 3:47 pm

You’ve been working with PHP for how many years Kevin and you still hadn’t heard of this til now ;)?

Mike January 9, 2006 at 1:11 pm

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

I didn’t know Gamespot used PHP.

This Easter Egg comes in handy. ;)

t0xa January 9, 2006 at 4:43 am
shlomil January 9, 2006 at 4:07 am

old news …

One of the dogs is well known in the PHP community :
http://suraski.net/blog/index.php?/archives/6-Scotch-is-gone.html

BerislavLopac January 9, 2006 at 4:02 am

Actually, these images are to be displayed in phpinfo() output on certain dates — April 1st, Easter and probably a few others. That they can be displayed on their own is a side effect.

pdxi January 8, 2006 at 11:30 pm

Overheard at a recent PHP developers conference:

“Alright folks, we can do one of two things. We can make PHP ready for the enterprise, or we can have a picture of a dog.”

Comments on this entry are closed.

{ 6 trackbacks }