What's foo?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
impulse()
Forum Regular
Posts: 748
Joined: Wed Aug 09, 2006 8:36 am
Location: Staffordshire, UK
Contact:

What's foo?

Post by impulse() »

I've seen $foo a lot in PHP scripts but what's special about it? Is it just a common variable name when nothing good comes to mind?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Yes, Foo and Bar are names used as placeholder names in discussions.
(#10850)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

If you really think about it, foobar is a necessity in programming examples. If you just used whatever came to mind, people may wonder what the value is supposed to be... where it came from, etc. For example... I used to use $poo and $pee where I now use $foo and $bar. These variables probably would confuse you if I put them in an example, right?
Post Reply