Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37082 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92108 invoked from network); 17 Apr 2008 16:33:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 16:33:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; 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:29732] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/92-05127-9DB77084 for ; Thu, 17 Apr 2008 12:33:42 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Apr 2008 19:34:11 +0300 Received: from [192.168.16.217] ([192.168.16.217]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Apr 2008 09:34:08 -0700 Message-ID: <48077BD2.2000107@zend.com> Date: Thu, 17 Apr 2008 09:33:22 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Felipe Pena CC: internals@lists.php.net References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> In-Reply-To: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 17 Apr 2008 16:34:08.0290 (UTC) FILETIME=[DBD0C020:01C8A0A8] Subject: Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value) From: stas@zend.com (Stanislav Malyshev) Hi! > If anyone wants use type hinting, i believe that it should be strict. > Otherwise, it makes more sense to not use it. Just for the record, I see absolutely no sense in strict type hints. While there might be some use cases when you want to save typing by having function convert the arguments instead of you doing it manually - there's absolutely no sense to check types strictly in PHP, especially taking into attention that no API ever worked that way, and that it would force users to surround each call to such function with checks for argument types, since PHP can not have static type control. Using such feature would be a nightmare. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com