Use declare(strict_types=1) to enable strict mode for type checking
- ·
- Telegram
- ·
- Newsletter
PHP reminder: The "declare(strict_types = 1);" directive enables strict mode. In strict mode, only a variable of exact type of the “type declaration” will be accepted, or a "TypeError" will be thrown. ✅