Programming Languages
PHP
Objective
Sep 23, 2025
What is the correct way to declare a PHP 8+ intersection type?
Detailed Explanation
Explanation: PHP 8.1 introduced intersection types using the ampersand (&) operator. This means the parameter must satisfy all specified types simultaneously, useful for objects implementing multiple interfaces.
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts