Open mindplay-dk opened 6 years ago
func_type_args()
sounds like something that would be scoped to the function, so it would only get the type arguments of the function, not the class. If it were to include the class type arguments, then that could get messy:
class Foo<X, Y>
{
public function<Z> bar()
{
func_type_args(); // [int, string, array] ? doesn't seem very helpful
}
}
$foo = new Foo<int, string>();
$foo->bar<array>();
I'm pretty content to let reflection be the sole provider of this information.
The "Parameterized Functions and Methods" section mentions in passing a
func_type_args()
function, which would complimentfunc_get_args()
for type-arguments.Does it make sense? do we need this feature?
If we have reflection, as well as the
::class
constant, maybe we don't need this?