Re: type hinting

From: Date: Fri, 04 Jan 2008 17:46:00 +0000
Subject: Re: type hinting
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-34425@lists.php.net to get a copy of this message
On Fri, Jan 04, 2008 at 12:11:41PM -0500, Sam Barrow wrote: > Exactly. I just added the "mixed" type hint which is the same as using > no type hint. The new patch is attached. > > Extra keywords (real, long, double, etc.) have been taken out. The > available type hints are now mixed, int, float, bool, string, scalar, > num, resource, and object. And of course array and class type hints > still work. I notice that you use strcasecmp() to compare type name. I thought that we were moving away from case independence, ie the type should be 'int' or perhaps 'INT' - whatever we agree on it should have a defined capitalisation. Just an off the wall thought ... if the type is not a known scalar type or class, then check to see if the word is a constant ... could be interesting .... aka C's typedefs. -- 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>

« previous php.internals (#34425) next »