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/

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to