Use short tags
allow sql injection
don't validate your data
trust in your users ;)
allow sql injection
don't validate your data
trust in your users ;)
Here are a few ways to avoid mistakes that are best avoided then encountered:
- Turn on error_reporting(E_ALL E_STRICT); in development.
- Unless you're using register_shutdown_function, die / exit is usually a very bad and ungraceful way of handling errors, especially in production.
- Don't use regex (preg_match, etc) for simple string searches.
- Format your code.
- Use an opcode cache (APC or an equivalent thereof).
- Use a distributed object cache when appropriate.
- And More...