Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48436 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33092 invoked from network); 24 May 2010 17:16:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2010 17:16:02 -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:48689] helo=mail.sugarcrm.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/03-13219-054BAFB4 for ; Mon, 24 May 2010 13:16:01 -0400 Received: from stasmacbook.cup1.sugarcrm.net (10.8.11.37) by exch-cupertino1.cup1.sugarcrm.net (10.8.1.103) with Microsoft SMTP Server (TLS) id 8.1.393.1; Mon, 24 May 2010 10:15:57 -0700 Message-ID: <4BFAB44D.1080207@sugarcrm.com> Date: Mon, 24 May 2010 10:15:57 -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: Dmitry Stogov CC: "internals@lists.php.net" References: <7.0.1.0.2.20100522175819.0a601c68@zend.com> <65101.93.108.152.52.1274662417.squirrel@www.geleia.net> <7.0.1.0.2.20100524075150.16056330@zend.com> <4BFA147F.4090307@sugarcrm.com> <4BFAA201.3000608@zend.com> In-Reply-To: <4BFAA201.3000608@zend.com> 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! > In case we remove 'Array->scalar' and others everywhere, #3 would be the > same as #2. I'm for that. AFAIK parse_parameters already rejects Array->scalar, so if we can tweak it so that it would make sense for all cases, even better. As for implicit/explicit casts, I'm not sure - it might make sense for explicit cast to behave a bit differently, but maybe that's not worth it. So if we can find a set of rules that work for all cases, such as: implicit casts ($a+$b, "$a", etc.), explicit casts ((int)$a), internal function and user-space functions - it'd be excellent, I'd be all for it. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227