I'd definitely agree on returning `int` instead of `integer`. PHP allows both `class integer` and `class resource`, so `int` (plus documenting exact return values for examples, as Nikita mentioned) would be useful to prevent ambiguity.
Also, it'd be nice to have `null` return the lowercase string null instead of uppercase. get_canonical_type() is my weak preference. I'd also considered suggesting get_class_or_type(), but that seemed misleading since the value of get_class_or_type(2) would be different from gettype(2). This would save some time and make it easier to write better messages debugging, syslogging, throwing exceptions for unexpected values, etc. - Tyson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php