PHP Easter Eggs

04 Feb 2006

I can never remember the PHP Easter egg strings, so I'm putting them in my blog. This probably isn't news to anyone, but here they are for reference:

Here's an example usage:

The current Easter egg is Zeev's dog Scotch:

It used to be Stig's dog Nadia (thanks to Ilia for confirming this):

Here's another:

If you've been using PHP for a while, you probably remember this picture of Thies:

The logo displayed on a phpinfo() page uses the PHP logo string except on April Fool's Day (01 Apr), when it uses the Easter egg string instead, giving some people quite a surprise.

These strings are useful for determining whether a particular URL is a PHP resource. For example, 37signals (the creators of Ruby on Rails) use PHP for their web site:

They also use PHP for the web sites of Basecamp, Backpack, and even Ruby on Rails.

Note: If you want to find these in the source, they're in ext/standard/info.h. If you want to disable them, set expose_php to Off.