On Wed, Jul 16, 2014 at 09:31:46AM +0100, Rowan Collins wrote: > Now, one form of compromise is to use variants of the syntax, such as... > > function foo((int) $bar) > function foo(-int $bar) > ...
A slight tangent, but *if* this sort of syntax is adopted we need to think what will happen when someone puts a class name in there instead of a basic type. I would suggest that it be a compile error of some sort if the 'type' is anything other than int, float, .... The only one that may make sense is function foo((array) $bar) If $bar is not an array it would make an array containing one element with value $bar. -- Alain Williams Linux/GNU 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 #include <std_disclaimer.h> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php