Programming Languages PHP Objective
Sep 23, 2025

Which attribute is used in PHP 8+ to mark a function parameter as sensitive for debugging?

Choose the correct answer:
A) #[SensitiveParameter]
B) #[Sensitive]
C) #[Hidden]
D) #[Private]
Detailed Explanation

Explanation: The #[SensitiveParameter] attribute was introduced in PHP 8.2 to mark parameters as sensitive, preventing their values from appearing in stack traces. This is crucial for security when handling passwords, API keys, etc.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback