4 ms·
I'm pretty excited about the new "uninitialized" state. Back in my PHP days I also had the phase of writing my own framework and ORM, and it annoyed me that I c
by felixfbecker 7y ago
I'm pretty excited about the new "uninitialized" state. Back in my PHP days I also had the phase of writing my own framework and ORM, and it annoyed me that I couldn't distinguish between "not loaded" and database null. This seems like it would make the "not loaded" state possible!
- jesseschalken 7y agoAlthough isset() still returns false for null ;)
- wwweston 7y agoWhich is a little weird, but cases where you'd want `isset` to treat variables intentionally set to null the same as variables that are entirely undeclared are considerably more frequent (just ran into one yesterday!) than cases where you'd need to carefully distinguish them.
- jesseschalken 7y agoIt's also great at hiding bugs where you mistyped the variable name passed to isset(). ;)