Hi! > - is_digits() and digits type for digits only inputs(integer like string) > - is_numeric() and numeric type for float like string
This is not what types are in PHP, and not what they should be, IMO. If you want to assign arbitrary checks to a variable, I would suggest using a class with a suitable constructor. If you think it's too slow (meaning you are doing very heavy in-memory data processing and nothing else), make an extension - it would be roughly the same speed as native PHP types. If you want it to be extensible - then you may be looking for something like pre/post conditions and DbC, but this is another story for which we need proper RFCs, etc. However, calling random combination of native types, objects and string constraints "type" because somewhere there's use case for it does not look like a good design for a language. It's too random and ad-hoc. -- Stas Malyshev smalys...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php