Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81471 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90590 invoked from network); 31 Jan 2015 08:12:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jan 2015 08:12:59 -0000 Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.114.167 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.114.167 spritz.beccati.com Received: from [176.9.114.167] ([176.9.114.167:43139] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/00-24235-88E8CC45 for ; Sat, 31 Jan 2015 03:12:58 -0500 Received: (qmail 24387 invoked from network); 31 Jan 2015 08:12:53 -0000 Received: from home.beccati.com (HELO ?192.168.1.202?) (88.149.176.119) by mail.beccati.com with SMTP; 31 Jan 2015 08:12:53 -0000 Message-ID: <54CC8E81.3020104@beccati.com> Date: Sat, 31 Jan 2015 09:12:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Philip Sturgeon , "internals@lists.php.net" References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][DISCUSSION] ReflectionParameter::getClassName() From: php@beccati.com (Matteo Beccati) Hi Phil, On 31/01/2015 05:14, Philip Sturgeon wrote: > This RFC adds a new method to ReflectionParameter to allow easy access > to a class name in a type hint, avoiding the need to actually load the > class and use `get_class()` or `::class`. > > https://wiki.php.net/rfc/reflectionparameter-getclassname Looks good to me! Just a couple of minor things. 1) The RFC does not mention what happens if the parameter is not type hinted, or what happens when hints are namespaced and/or use clauses are used. 2) There's a tiny bit of overlap with "scalar type hints", if it is accepted (in any form) and reflection support added to it. Depending on the way such reflection support is implemented, the method proposed here could be a perfect match. Or perhaps it could be in the way. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/