Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37058 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72620 invoked from network); 17 Apr 2008 12:00:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Apr 2008 12:00:56 -0000 Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 66.249.92.173 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 66.249.92.173 ug-out-1314.google.com Received: from [66.249.92.173] ([66.249.92.173:42573] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DC/E6-38326-3FB37084 for ; Thu, 17 Apr 2008 08:00:54 -0400 Received: by ug-out-1314.google.com with SMTP id u40so1121432ugc.29 for ; Thu, 17 Apr 2008 05:00:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=1gPuMubjDPkhllNNIgMdO3Di3bPdfcShrAJdNOcx3vg=; b=nYDtwKq+s3K+67e/RAwLJ79mOLKk2npoHIydSb556U4u9ZNKo1r3tf/wIBeck0q++WYX7A/XmTu9ZE+r+lCPf7Yt/UNxCNlv/oOUUycm493oAyvUAMYsFZizYA+NgK8DF1mj2lyl/XIHPltXrRz2xp1T9cJfmTucwfSBhT52uz0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=WfHZV/P1pXb+JpOPhqR9GhpjIQov2P0ZVBudkhu5tvpkwmCvZOjTPgtRVAaj8zRor8Na7rZXBQm1RTDz7HrBuoJMwOIwzwZ1CwVOGFe1V5Tm0IhPP1V+Az9bqaYEyQBNyz8OdnO7AAfGjOn0TmRQpG+YBzGJcgGihjL4if2DgY0= Received: by 10.67.115.9 with SMTP id s9mr8350279ugm.81.1208433644295; Thu, 17 Apr 2008 05:00:44 -0700 (PDT) Received: by 10.66.219.9 with HTTP; Thu, 17 Apr 2008 05:00:44 -0700 (PDT) Message-ID: <9b3df6a50804170500p7aabbc44h503f2e9c0d0cdb71@mail.gmail.com> Date: Thu, 17 Apr 2008 15:00:44 +0300 To: "Christian Schneider" Cc: "Felipe Pena" , internals@lists.php.net In-Reply-To: <48073922.6030808@cschneid.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_12388_9368696.1208433644289" References: <1208404255.5665.34.camel@pena> <48073922.6030808@cschneid.com> Subject: Re: [PHP-DEV] Re: [RFC] Type hints (parameter and return value) From: arvids.godjuks@gmail.com ("Arvids Godjuks") ------=_Part_12388_9368696.1208433644289 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Christian Schneider > I don't like the difference between > function (int) test($value) { ... } > and > function test(integer $value) { ... } First is function return value should be int, second is function arg should be int. So full syntax will be like this function (integer) test(integer $value) { ... } That means function takes an integer as argument and returns integer value. If any is violated - Catchable error will be thrown. That's my understanding of this patch. Some more examples function (resource) query(string $table, array $where = array(), array $limit = array()) { ... } function (array) getData(string $table, array $limit = array(0, 20), array $where = array()) { /* cals query and generates an array from result */ } etc. ------=_Part_12388_9368696.1208433644289--