|
|
|
|
|
by calvinmorrison
32 days ago
|
|
yes I say this now very often, that PHP has morphed into runtime Java. Quite nice in some ways. In PHP though the STDlib is not very well thought out, it may be fun(needle,haystack) or fun(haystack,needle) and you just have to remember empty() will do weird stuff like a string with the value "0" is also empty, so not great for parsing things. A lot of footguns and the best way to avoid that is with a decent linter that lets you be picky another thing I mention is avoiding the array_ stuff because of aformentioned reasons, it's easier to remember/reason about boring loops unfortunately. |
|