It is said that, at the bottom of the Chinese statue, there were images and texts that represented "Fu" in the first place, and they changed to "foo" by transliteration "Fu ", then, a cartoon writer often uses this word in comics. For example, if it is used in the cartoon background and does not represent any specific meaning, then "foo" became a common term used by the US, Britain, and the United States, it is also said that the "foo" at this time comes from the transliteration of the French "fire.
Foo and bar are from the mantra fubar (F ** ked up beyond all repair) between the US military in the Second World War (note: the soldiers in the thunderhorse rescue often say fubar ), later it evolved into Foo and bar, which were most common in API and tech doc, and were set as a name for variables and functions that were not particularly interesting (a lot can be seen in PHP ). Internet Engineering Task Force also has RFC for foo and bar (request for comment, mostly internet protocol and standard technical articles, such as HTTP and SMTP ). This RFC describes the history and variations of Foo and bar, as well as the RFC for foobar.
To put it bluntly, foo is just a casual name in the document, just as we are used to replacing a person with a name that is not important when telling stories.
Foo's formal explanation:
Foo/
1. INTERJ. Term of disgust.
2. [very common] used very generally as a sample name for absolutely anything, esp. programs and files (esp. Scratch files ).