Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44608 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63816 invoked from network); 1 Jul 2009 21:02:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2009 21:02:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.156 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 72.14.220.156 fg-out-1718.google.com Received: from [72.14.220.156] ([72.14.220.156:7516] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/54-43450-ADECB4A4 for ; Wed, 01 Jul 2009 17:02:18 -0400 Received: by fg-out-1718.google.com with SMTP id 13so998490fge.0 for ; Wed, 01 Jul 2009 14:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=exWJ9GQqd88utqKS2iLczI41cWbswWX0FTUWU+6dr2E=; b=su/CV7/p/7z8uPTtbgyZrQbTYmNFZ7ynl5d7MJr0vKSVZJbHAXs0PiVMY5kVwZZKdy WTUfBauTSu3ro10M+eoCnPVFzFItmk6gg9AFJ4fMwWbCPybgv26pKXq2En2eNsact7LY mBa7BUxXOrgahxMtoBpZ73rrZTRzC28djl598= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ToUMlW0lD1utJbAqCvf6jWz6Cutkp0/jq1x3VB86qFMvteSbe4ZWZDcBJaS0rn13Sm DMwWMNFgsa+HEE7Gvo//JOKwDyPu36v3hK22dOXbix8U9KipqZ1riBb6XryKo4PYksti vWlDz6eUEDqinoZcAAUclVrQAVdRfVuUo9qoI= MIME-Version: 1.0 Received: by 10.86.93.20 with SMTP id q20mr4901290fgb.16.1246482135564; Wed, 01 Jul 2009 14:02:15 -0700 (PDT) In-Reply-To: <4A4BCC0D.6000704@zend.com> 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> Date: Wed, 1 Jul 2009 23:02:15 +0200 Message-ID: <7f3ed2c30907011402taa51848h56dfff924c59a6cb@mail.gmail.com> To: Stanislav Malyshev Cc: Ilia Alshanetsky , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3 From: hannes.magnusson@gmail.com (Hannes Magnusson) On Wed, Jul 1, 2009 at 22:50, Stanislav Malyshev wrote: > No, internal typehint doesn't work the way "int" typehint works with this > patch. Internal typehint (zend_parse_parameters) do conversions, see You are wrong. Internal type hinting is done in the form of argument information. Those are identical to the userspace type hinting. ZEND_BEGIN_ARG_INFO(arginfo_foo, 0) ZEND_ARG_OBJ_INFO(0, MyClass, argumentName, 0) ZEND_END_ARG_INFO(); is the same as the userspace form of: function foo(MyClass $argumentName) {} The current patch is missing a ZEND_ARG_STRING_INFO(0, argumentName, 0) which would be the same as fnuction foo(string $argumentName){} If that is the onlything you are worrying about then thats easily fixed. zend_parse_parameters(... abcdefg) is the same as function($a, $b, $c..) { $a = (int) $a; $b = (string) $b; $c = (array) $c...} -Hannes