IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New What are you actually trying to check for?
I very rarely use empty() but I use is_null() a bit and isset() a lot. IMO, empty() is vestigial. PHP doesn't actually have a concept of "empty".

I much prefer Icon's approach: not-set variables are semantically identical to those containing &null which can be passed like any other value. Icon also has prefix operators / and \\ which mean check for null and check for not-null. Much cleaner than PHP's isset().

Wade.

"Ah. One of the difficult questions."

New type agnostic
"Empty" is a lot like XBase's "empty" :-) You don't have to worry about whether it is a string or number. You can later change the "type" for example, and not worry about code not working. Also, some databases don't have null number defaults (by vendor or DBA decision), but initialize to zero. Thus, it also makes it more DB vendor agnostic. IOW, "maintenance friendly". I like it.

Regardless, I think accepting only variables and NOT functions nor constants is just plain dumb! (for all the "language constructs", not just "empty".)
________________
oop.ismad.com
     PHP 'empty' Oddity - (tablizer) - (4)
         That construct isn't supposed to work. - (static) - (3)
             No function results either? You've gotta be kidding - (tablizer) - (2)
                 What are you actually trying to check for? - (static) - (1)
                     type agnostic - (tablizer)

But don't you come 'round here thinking you can add to the Holy Fortune Cookies.
54 ms