What are the best practices for escaping or sanitizing user input in PHP?
Do the PHP best practices depend on the environment in which you are working?  For example, do WordPress and Facebook use a different set of best practices?