Hi!

The problem with this is that there's not much point in converting the
value. PHP will do that anyway, making this kind of pointless.

There would be a point since PHP might convert to different type that you intended. Think of $foo = "My age is $age". If $age is supposed to be int, then converting int hint might help.

Overall, I think type hinting should work by checking the type. If it
does not match, raise an error. For example, int means int, not numeric
string.

What code scenario would make it necessary to distinguish between number stored as string and number stored as binary?

This only serves to include an additional type juggling system into php,
which is very confusing.

There's already type juggling in PHP, and if you find it confusing, you find whole PHP and whole set of dynamic languages very confusing. I guess maybe C or Java would work better then :)
--
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

Reply via email to