Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37122 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35001 invoked from network); 18 Apr 2008 00:25:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2008 00:25:08 -0000 Authentication-Results: pb1.pair.com header.from=felipensp@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=felipensp@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.166.182 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: felipensp@gmail.com X-Host-Fingerprint: 64.233.166.182 py-out-1112.google.com Received: from [64.233.166.182] ([64.233.166.182:64836] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 24/FD-05127-36AE7084 for ; Thu, 17 Apr 2008 20:25:08 -0400 Received: by py-out-1112.google.com with SMTP id u77so301463pyb.16 for ; Thu, 17 Apr 2008 17:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; bh=MPWkUJYk0R/SfmKt7fS8rxCBNxYICFU7bsSVKjaKBVM=; b=vjz/fw1VitabPq40WdZZOKl9V+8a89lwmdj96I/7kjSHZTIOuFMcoONOQzfvhbq5bXHEVMlMnRpnj3mcMs7B1nWQaIOj7aqf1cqaQ0lLdMeHLGP6x6shqYKK8mRLdfKr6XN5SMO316yjoMcG4x6rSonh5I/D/+Fl5qJsmmI3hpk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=R1KTVLy+ImvkEb/0cCvUL1DHyJ5lkXvwBSgrElDQ64P3uQCqJEDDhKo8DHBJpis2nbOyytkHT2z91lKzJE602AmrImXvQPzKFfz+smd/dLhyXRH0wHFtCRReF1eNvorEexCC7Sj8evzrWigmUS6TfCOn0hkd+17dBdWXshZ4Uuw= Received: by 10.65.204.7 with SMTP id g7mr3733651qbq.33.1208478273054; Thu, 17 Apr 2008 17:24:33 -0700 (PDT) Received: from ?192.168.1.2? ( [189.24.91.115]) by mx.google.com with ESMTPS id q16sm6553903qbq.0.2008.04.17.17.24.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 17 Apr 2008 17:24:32 -0700 (PDT) To: Lars Strojny Cc: internals@lists.php.net In-Reply-To: <1208466868.4430.10.camel@localhost> References: <46ccd1ab0804170742g142ed562t4f03339da549a820@mail.gmail.com> <1208466868.4430.10.camel@localhost> Content-Type: text/plain; charset=utf-8 Date: Thu, 17 Apr 2008 21:24:26 -0300 Message-ID: <1208478266.5763.14.camel@pena> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value) From: felipensp@gmail.com (Felipe Pena) Em Qui, 2008-04-17 às 23:14 +0200, Lars Strojny escreveu: > Hi Felipe, > > first of all, thanks for your proposal. I like it. > > Am Donnerstag, den 17.04.2008, 11:42 -0300 schrieb Felipe Pena: > > Hi. > > > > Well, thinking better about the behavior of type hinting, i decided to > > change the proposal for strict type. I.e. don't accept numeric string > > as an intenger, etc. > [...] > > I would also like to see scalar and numeric too, but that's just for the > record. > For ReflectionParameter I would like to see an additional > ReflectionParameter::isType(string $type_name) to allow constructs like > foreach (array("string", "integer") as $type) > if (!$reflection_param->isType($type)) > throw new Exception(); I also thought that when adding the is methods! :D > What about additions in the ReflectionMethod-class? I would say adding > ReflectionMethod::isInt(), ...::isDouble() and isType() would be > appropriate. Sure, should there be! Thanks for remember me. But i think that is as name is confuse in this case. We need a name for that. -- Regards, Felipe Pena.