array_fill_keys

Fills an array with the value of the value parameter, using the values of the keys array as keys

function array_fill_keys<Tk as arraykey, Tv>(
  mixed $keys,
  mixed $value,
): darray<arraykey, mixed, Tk, Tv>;

Parameters

  • mixed $keys - Array of values that will be used as keys. Illegal values for key will be converted to string.
  • mixed $value - Value to use for filling

Returns

  • mixed - - Returns the filled array