On Thu, Jan 03, 2008 at 10:43:39AM -0800, Stanislav Malyshev wrote: > >When the type hint says I want an integer, then only integer should be > >accepted; no casting should be done. It may give predictable results > > Why people that want Java just don't use Java I wonder? PHP never was a > strict static typed language.
You aren't making it a strict static typed language. All that you are doing is saying that at certain points (function entry) that the values are checked and converted to certain types. If within the fuction an argument hinted as integer is used in a string context, the juggling will still happen. What you are doing to allowing the function author to protect the integrity of his code without having to resort to a regex/... to check what the arguments are. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http://www.ukuug.org/ #include <std_disclaimer.h> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php