4 ms·
It only appears to be "insane" if you are not used to working with dynamically-typed languages. PHP has been dynamically-typed from the very beginning, so you
by alphadevx 8y ago
It only appears to be "insane" if you are not used to working with dynamically-typed languages. PHP has been dynamically-typed from the very beginning, so you need to program defensively and check type at runtime (no assumptions are safe).
- IgorPartola 8y agoThese days I do 99% of my work in Python3 and JS/ES6. PHP is still the most insane version of this, though JS isn't far behind.
- evilduck 8y agoMake the jump to including TypeScript in your toolchain, even if you don't ever intend to write any TypeScript. The type checking it does on regular javascipt is still beneficial in catching and preventing a lot of coercion mistakes or attempting to accessing things that are potentially undefined.