Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48406 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11435 invoked from network); 23 May 2010 08:37:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 May 2010 08:37:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 74.85.23.205 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 74.85.23.205 mail.sugarcrm.net Windows 2000 SP2+, XP SP1 (seldom 98 4.10.2222) Received: from [74.85.23.205] ([74.85.23.205:24649] helo=mail.sugarcrm.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/47-54147-649E8FB4 for ; Sun, 23 May 2010 04:37:27 -0400 Received: from StasMacBook.local (98.210.181.235) by exch-cupertino1.cup1.sugarcrm.net (10.8.1.103) with Microsoft SMTP Server (TLS) id 8.1.393.1; Sun, 23 May 2010 01:37:24 -0700 Message-ID: <4BF8E943.9040003@sugarcrm.com> Date: Sun, 23 May 2010 01:37:23 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: References: <7.0.1.0.2.20100522175819.0a601c68@zend.com> <93EFAEF4-26F3-44A1-85ED-5E71E665B966@pooteeweet.org> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Type hinting From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I agree. function foo(array $x) {} foo(123); doesn't cast int(123) to > array(123) so introducing different meaning for scalar types feels > very very wrong. Casting integers to arrays never happened in PHP. Casting strings to integers and back always happened. Including in internal functions. Now internal and user functions would work differently, and half of PHP would be dynamically typed while another half would be statically typed. I fail to see how it may be a good thing. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227