← All built-ins / sizeof()

sizeof()

sizeof(mixed $v): int

Parameters

NameTypeDescription
$varray|stringarray or string

Return value

Same as count().

Example

echo sizeof([1, 2, 3, 4]);
4

See also

count()