It seems like the NULL type is a scalar type, ie it has a discrete set of
values. I suppose from an SQL perspective, one could argue NULL is a
special value that destroys any attempts at evaluation. However, PHP has a
precedent that relates to this issue: the ctype functions. For example,
is_alpha('') is TRUE...of course, because the null set is always a part of
every set (in textbook mathematics, anyway).
Anyway, the is_scalar() function is currently returning FALSE when passed a
NULL value. May I suggest adding the IS_NULL constant to the top part of
this function's case statement? I'm not sure if this has negative BC
issues.
I don't feel particularly passionate about this issue, it just occurred to
me as I was reviewing the function.
Comments?
Thanks,
Leon
---
Leon Atkinson <http://www.leonatkinson.com/>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php