Q. What will be the output?
Code:
$a = "<script>alert(1)</script>"; echo htmlspecialchars($a);
β
Correct Answer: (B)
<script>alert(1)</script>
Explanation: Escapes HTML to prevent XSS.