Common PHP security issues include SQL injection, XSS, and CSRF. Use PDO prepared statements, htmlspecialchars() for output, and CSRF tokens for forms. Keep PHP and all Composer packages updated regularly.
PHP Security
SQL Injection — always use PDO prepared statements
XSS — escape output with htmlspecialchars()
CSRF — use CSRF tokens in all forms
Passwords — use password_hash() / password_verify()
File uploads — validate MIME type, not just extension
Sessions — use session_regenerate_id(true) after login
Error messages — never show stack traces to users
HTTPS — redirect all HTTP to HTTPS
Input validation — filter_input() and type casting