3 ms·
Most of what it says is still true today. Stdlib did add new functions and flags (which only add to the inconsistency) but most the ones the article mentions st
by hiccuphippo 4y ago
Most of what it says is still true today. Stdlib did add new functions and flags (which only add to the inconsistency) but most the ones the article mentions still have the same behavior today. Plus new issues as well.
Something I found the other day, typed parameters won't error if you change the type, even with strict_types turned on:
function foo(string $foo) {
$foo = 10;
}
- rafark 4y agoThis is expected behavior and works like a charm. The type of a variable can always change at any time. The argument hint is designed to make sure you’re given the expected type. Not that the variable will only hold that type.
- smt88 4y agoYeah, I mean it's still a dynamic language with the pitfalls that come with it (many shared with JS and Python). Do I think dynamic languages are terrible and hate all three of the above? Yes. Do I think modern, idiomatic PHP still suffers from most of TFA's examples of bad design? No.