Unless you are aware of the type of your variables and the data they contain as you write your applications, you are only inviting trouble anyway. Yes,
If you think so, you should use statically typed languages, why invite trouble from the start?
The one I mentioned not so long ago, or we you not paying attention? Having the type hinted on the function declaration saves me the time and energy of checking the type myself, which is something I have to do quite often. It, of
Maybe you should write your code differently, so that you shouldn't check it so often. I just checked in Zend Framework source - which is not a small body of code - is_integer is used in capacity you want to use typehints (i.e. "this type or error out") only twice, and in both cases I'm not sure it's needed. is_float is not used even once, and is_string I found used only three times in this way, all IMHO unnecessary since simple (string) would work. It could make at least minimal sense to make it converting - but making it type-strict just makes your application blow up in different, less expected, places without actually saving you any time on coding.
-- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php