Skip to main content
InterviewHubPRO
Section Overview
Q48

Question 48 of 50

Part 3: Production Tuning, Asynchronous Workers & High Scale (25 - 35)

96%
PHP & Zend Engine (50 Qs)•Part 3: Production Tuning, Asynchronous Workers & High Scale (25 - 35)

Security in Modern PHP: Password Hashing and Input Sanitization.

senior LevelAsync & PromisesSecurity & Auth

In Simple Words:

  • Password Hashing API: Always use password_hash($pwd, PASSWORD_ARGON2ID). Automatically generates cryptographically secure salts and resists GPU brute-force attacks.
  • Prepared Statements with PDO: Always use PDO::prepare() with parameter placeholders to eliminate SQL injection.
  • Session Security: Set session.cookie_httponly = 1, session.cookie_secure = 1, and session.cookie_samesite = 'Strict'.