Function __global->count

Definitions

sources_custom/phpstub.php

  • Count elements in a variable.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$var array No No required parameter N/A N/A Variable to count elements of
$mode integer No No 0 N/A N/A The count mode (COUNT_NORMAL or COUNT_RECURSIVE)

Returns

  • The count
  • Type: integer
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Count elements in a variable.
 *
 * @param  array $var Variable to count elements of
 * @param  integer $mode The count mode (COUNT_NORMAL or COUNT_RECURSIVE)
 * @return integer The count
 */

function count(array $var, int $mode = 0) : int