Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44613 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80964 invoked from network); 1 Jul 2009 22:05:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2009 22:05:02 -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 63.205.162.117 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.117 us-mr1.zend.com Linux 2.4/2.6 Received: from [63.205.162.117] ([63.205.162.117:34220] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 03/D7-43450-C8DDB4A4 for ; Wed, 01 Jul 2009 18:05:01 -0400 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id 325CFE12C3; Wed, 1 Jul 2009 14:53:55 -0700 (PDT) Received: from [192.168.16.83] ([192.168.16.83]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 1 Jul 2009 15:05:33 -0700 Message-ID: <4A4BDD88.6080304@zend.com> Date: Wed, 01 Jul 2009 15:04:56 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Hannes Magnusson CC: Ilia Alshanetsky , PHP internals References: <4A4BA5C8.1020204@zend.com> <4A4BAE7B.3020601@zend.com> <39D0B97E-3A70-44E3-B1BC-D68A0E58CA76@prohost.org> <4A4BC731.1020909@zend.com> <7f3ed2c30907011342y24ccd2c7te5f7c273f001fa7a@mail.gmail.com> <4A4BCC0D.6000704@zend.com> <7f3ed2c30907011402taa51848h56dfff924c59a6cb@mail.gmail.com> In-Reply-To: <7f3ed2c30907011402taa51848h56dfff924c59a6cb@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Jul 2009 22:05:33.0927 (UTC) FILETIME=[0E562770:01C9FA98] Subject: Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3 From: stas@zend.com (Stanislav Malyshev) Hi! > You are wrong. Internal type hinting is done in the form of argument > information. You are confusing arginfo's with zend_parse_parameters types. They work differently (class typehints are strict, because there's no way to convert classes from one type to another). These aren't even the same types - all objects have the same internal type, IS_OBJECT, so it works on entirely different level. > The current patch is missing a ZEND_ARG_STRING_INFO(0, argumentName, > 0) which would be the same as > fnuction foo(string $argumentName){} That doesn't exist and wouldn't exist for currently available functions since making internal functions do that (strict type matching) would be a huge code breakage. > zend_parse_parameters(... abcdefg) > is the same as > function($a, $b, $c..) { $a = (int) $a; $b = (string) $b; $c = (array) $c...} Now it is, but that's not the way typehints work in the proposed patch. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com