Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34425 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50001 invoked by uid 1010); 4 Jan 2008 17:46:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49985 invoked from network); 4 Jan 2008 17:46:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 17:46:33 -0000 Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 213.152.38.186 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 213.152.38.186 freshmint.phcomp.co.uk Linux 2.5 (sometimes 2.4) (4) Received: from [213.152.38.186] ([213.152.38.186:61121] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 72/1F-63281-6E07E774 for ; Fri, 04 Jan 2008 12:46:25 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.67) (envelope-from ) id 1JAqcK-0003Sz-HX; Fri, 04 Jan 2008 17:46:00 +0000 Date: Fri, 4 Jan 2008 17:46:00 +0000 To: Sam Barrow Cc: Pierre , Gregory Beaver , Alain Williams , internals Mailing List Message-ID: <20080104174600.GB12202@mint.phcomp.co.uk> References: <477DB7BF.10201@chiaraquartet.net> <20080104105558.GC7861@mint.phcomp.co.uk> <477E5649.2080104@chiaraquartet.net> <1199466070.15292.140.camel@sbarrow-desktop> <1199466701.15292.149.camel@sbarrow-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1199466701.15292.149.camel@sbarrow-desktop> User-Agent: Mutt/1.4.1i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] type hinting From: addw@phcomp.co.uk (Alain Williams) 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