3 ms·
Is `empty("0")` still true in PHP?
by shub 8y ago
Is `empty("0")` still true in PHP?
- tabtab 8y ago"blank" and "empty" are not the same thing in PHP. If you expect them to be, then you read the manual wrong. I generally include a set of common utilities where I define my own "isBlank()" function, which trims before comparing. There are different definitions of "blank" such that one size may not fit all. (Consider tabs and line-feed characters, for example.)