4 ms·
https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict https://www.php.net/manual/en/language.types.declarations.ph...
by artificialLimbs 4y ago
https://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.strict https://www.php.net/manual/en/language.types.declarations.ph...
- Tainnor 4y agoThat's runtime type checking, which is a completely different thing and doesn't fit the analogy. Runtime type checking helps you fail fast, which hopefully prevents undefined behaviour and data corruption, and can help with fault localisation (some hardcore type theorists would even argue that runtime types aren't really "types" per se, but more like tags). Compile-time type checking is a soundness proof of your program, which is an entirely different thing.