Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34328 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92754 invoked by uid 1010); 3 Jan 2008 17:29:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92739 invoked from network); 3 Jan 2008 17:29:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Jan 2008 17:29:02 -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:60530] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D3/23-20810-15B1D774 for ; Thu, 03 Jan 2008 12:28:52 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.67) (envelope-from ) id 1JATrZ-00043x-8Z; Thu, 03 Jan 2008 17:28:13 +0000 Date: Thu, 3 Jan 2008 17:28:13 +0000 To: Sam Barrow Cc: Tomi Kaistila , internals@lists.php.net Message-ID: <20080103172813.GQ7861@mint.phcomp.co.uk> References: <200801031903.01980.tomi@cumulo.fi> <1199380881.15292.11.camel@sbarrow-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1199380881.15292.11.camel@sbarrow-desktop> User-Agent: Mutt/1.4.1i Organization: Parliament Hill Computers Ltd Subject: Re: [PHP-DEV] RE: Optional scalar type hinting From: addw@phcomp.co.uk (Alain Williams) On Thu, Jan 03, 2008 at 12:21:21PM -0500, Sam Barrow wrote: > I think E_WARNING would be appropriate. That's what happens when you > omit an argument to a function right? The other thing to note about type hinting is that it could result in faster code. The value is checked and if needed converted (eg string -> integer) when the function is called; it then need not be converted again when it is used in the function. This will presumably be a win if the value is used more than once. -- 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