Function __global->array_fill

Definitions

sources_custom/phpstub.php

  • Fill an array with values.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$start_index integer No No required parameter N/A N/A The first index of the returned array. If start_index is negative, the first index of the returned array will be start_index and the following indices will start from zero.
$num integer No No required parameter N/A N/A Number of elements to insert. Must be greater than zero.
$value mixed No No required parameter N/A N/A Value to use for filling

Returns

  • The filled array
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Fill an array with values.
 *
 * @param  integer $start_index The first index of the returned array. If start_index is negative, the first index of the returned array will be start_index and the following indices will start from zero.
 * @param  integer $num Number of elements to insert. Must be greater than zero.
 * @param  mixed $value Value to use for filling
 * @return array The filled array
 */

function array_fill(int $start_index, int $num, $value) : array