# size()

Determines the size/length of numbers, strings, arrays and countable objects

****

- Source: <https://github.com/getkirby/kirby/tree/5.5.3/config/helpers.php#L496>

****

```php
size(mixed $value): int
```

## Parameters

| Name | Type | Default | Description |
| ---- | ---- | ---- | ---- |
| `$value` (required) | `mixed` | – | – |

## Return type

`int`

## Examples

Number of elements in array:

```php
$array = ['a', 'b', 'c'];
dump(size($array)); // 3
```

Length of string:

```php
$string = 'Kirby is great';
dump(size($string)); //15
```

Value of number

```php
$number = 123456;
dump(size($number)); // number
```

Number of pages

```php
$pages = $site->index();
dump(size($pages)); // number of pages in collection
```