php/doc-en

Reflection calls with ...Args should support associative arrays for PHP 8

Aperta

#3355 aperta il 27 apr 2024

 (3 commenti) (0 reazioni) (0 assegnatari)XML (882 fork)auto 404
Extension: reflectiongood first issue

Metriche repository

Star
 (596 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Description

With PHP 8 we have named arguments and support for arbitrary arguments order. Making ReflectionClass::newInstanceArgs and ReflectionMethod::invokeArgs support associative arrays will mirror that functionality from reflection. Use case is for skipping retrieval of optional parameters and simplifying managements of arguments array.

Guida contributor