1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

What is Foobar (Foo Bar)?

History and Information about FooBar

By

The term foobar or foo and bar separately are often used in sample computer programs to demonstrate to a student how to do something. Although these variables are often used in online and print tutorials they have no actual value. They simply represent generic variables the user might need. For example:
 <?php 
 If ($foo > $bar) 
 {
 echo $foo
 }
 ?> 
Although nobody seems to know for sure the history of foo bar, some speculate it is a twist on the military slang "fubar", while others think it came from the foo signal in electronics that would have a bar paced above it if it was inverted. Regardless of it's origin, it has become a staple piece of programming culture.
Related Video
Basic PHP Syntax
Using PHP With HTML
See More About
  1. About.com
  2. Technology
  3. PHP / MySQL
  4. Programing Glossary
  5. Foo Bar PHP - Foobar PHP - Foobar History

©2014 About.com. All rights reserved.