Re: RE: Optional scalar type hinting

From: Date: Thu, 03 Jan 2008 17:28:13 +0000
Subject: Re: RE: Optional scalar type hinting
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-34328@lists.php.net to get a copy of this message
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 <std_disclaimer.h>

« previous php.internals (#34328) next »