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? Remember that language constructs are, in general, a cludge. They appear to be functions, but you can't use them in places where you'd use a function, such as validation callbacks. If you make is_null a language construct, validate($foo, 'is_null') would not work as people assume. There is no utility gained from removing or changing is_null. It complements the other is_* functions that check for a specific type, and having more than one way to achieve something is not always a bad idea. Let this one rest. --mats