Skip to content

Add 'application' file extension in example#118

Open
homersimpsons wants to merge 1 commit intoFakerPHP:mainfrom
homersimpsons:patch-1
Open

Add 'application' file extension in example#118
homersimpsons wants to merge 1 commit intoFakerPHP:mainfrom
homersimpsons:patch-1

Conversation

@homersimpsons
Copy link
Copy Markdown

This is the longest extension generated by Faker (with 11 characters).

Even if it is not highlighted as the longest one it can give insights that extensions are not always 3/4 characters.

Number of characters for longest extension can be found from

$mimeTypes = Faker\Provider\File::$mimeTypes;

var_dump(max(array_map('strlen', array_merge(...array_values(array_map(fn ($e) => (array) $e, $mimeTypes))))));

This is the longest extension generated by Faker (with 11 characters).

Even if it is not highlighted as the longest one it can give insights that extensions are not always 3/4 characters.

Number of characters for longest extension can be found from
```php
$mimeTypes = Faker\Provider\File::$mimeTypes;

var_dump(max(array_map('strlen', array_merge(...array_values(array_map(fn ($e) => (array) $e, $mimeTypes))))));
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant