Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Appendices : Userland Naming Guide : Tips

Tips

In order to write future-proof code, it is recommended that you prefix (or suffix) anything that goes into the global namespace with an uncommon 3-4 letter prefix (or suffix) separated with an underscore. It is recommended that in order to prevent namespace clashes with other userland code that projects research existing prefixes (or suffixes) used in other projects and advertise their chosen prefix (or suffix) appropriately. Examples:

  • MyPx_someFunc()

  • Foo_Date

  • $asdf_dbh

Related Examples ( Source code ) » userlandnaming.tips


Change Language


Follow Navioo On Twitter
Global Namespace
Rules
Tips
eXTReMe Tracker