Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34466 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39100 invoked by uid 1010); 4 Jan 2008 19:17:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39069 invoked from network); 4 Jan 2008 19:17:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2008 19:17:19 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:33348] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/CD-63281-2D08E774 for ; Fri, 04 Jan 2008 13:54:11 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 4 Jan 2008 20:54:08 +0200 Received: from [192.168.16.90] ([192.168.16.90]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 4 Jan 2008 10:54:04 -0800 Message-ID: <477E80CD.6080105@zend.com> Date: Fri, 04 Jan 2008 10:54:05 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Sam Barrow CC: Stefan Esser , internals Mailing List References: <477DB7BF.10201@chiaraquartet.net> <20080104105558.GC7861@mint.phcomp.co.uk> <477E5649.2080104@chiaraquartet.net> <477E619C.2050107@sektioneins.de> <477E79AE.6050407@zend.com> <1199472270.15292.177.camel@sbarrow-desktop> In-Reply-To: <1199472270.15292.177.camel@sbarrow-desktop> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 04 Jan 2008 18:54:04.0902 (UTC) FILETIME=[2DA01060:01C84F03] Subject: Re: [PHP-DEV] type hinting From: stas@zend.com (Stanislav Malyshev) > What's smaller, type checking with parameter type hinting, or manually > using is_int, is_string, etc? Smaller from what POV? Developer-side, it's the same - one check there, one check here. Execution-side, since is_integer is a function and not operation, it's a tiny bit slower, but as I said, if you got to this level, you are looking for optimization in a wrong place. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com