What does declare(strict_types=1) do?
- A Enables type coercion
- B Enforces exact type matching for scalar type declarations in that file
- C Disables all type checking
- D Enables strict error reporting
Answer
Enforces exact type matching for scalar type declarations in that file
Without it, passing the string "5" to an int parameter is silently coerced. With it, a TypeError is thrown.





