[PHP-DEV] Forced named parameters

Hi everyone,

Looking [RFC] Clone with v2, especially Larry's message
([RFC] Clone with v2 - Externals) I'm thinking that it might be a good idea to allow forcing function calls to use named arguments.

Python has it by defining arguments after the variadic argument:

   def compare(a, b, *v, key=None):
     ...

Since PHP named args work similarly, borrowing syntax makes sense. It would look like

   function f(Type $pos1, Type $pos2, ...$v, Type $named1, Type $named2)

or without the variadic

   function f(Type $pos1, Type $pos2, ..., Type $named1, Type $named2)

The scope is highly configurable functions and options objects:

     function json_encode(
         mixed $value,
         ...,
         int $depth = 512,
  // arguments instead of constants
  // easier for the code completion
  // and call strictness
         bool $hexTag = false,
  // arguments can be grouped by meaning
         // and new ones can be inserted into the middle
  // without breaking compatibility
  bool $hexAmp = false,
         // options can have values
         string $indent = ' ',
         // ...
     ): string {
         // ...
     }

P.S. I'm just planting an idea for now, unlikely that I'm able to develop it