On Fri, Jul 4, 2014 at 12:57 AM, Mats Lindh <mats.li...@gmail.com> wrote:
> On Fri, Jul 4, 2014 at 9:43 AM, Kris Craig <kris.cr...@gmail.com> wrote: > >> What would be wrong with changing it from a function to a language >> construct like isset() and empty()? If is_null() were the equivalent of >> !isset( $var ) || $var === NULL, it would make a hell of a lot more sense >> than what's there now. >> > > So your suggestion is to make it _exactly_ like isset? > No, isset() returns TRUE if a variable exists and is not NULL. So technically, my suggestion is to make it exactly the opposite of isset(). But now that I think of it, having is_null() essentially duplicate !isset() instead of duplicating === NULL wouldn't make it any more worthwhile. I guess I wouldn't object so much if the performance loss could be mitigated somehow. I don't mind having questionable aliases floating around for convenience (like with what Peter mentioned regarding callbacks), so long as they don't introduce a drag on performance. It's that completely unnecessary perf hit that troubles me. --Kris