feature-readingtime.php
Table of Contents
- estimate_reading_time() : array<string|int, mixed>
- Estimates the reading time for a given lump of text.
Functions
estimate_reading_time()
Estimates the reading time for a given lump of text.
estimate_reading_time(string $text[, string $lang = "en" ]) : array<string|int, mixed>
Ref https://github.com/sbrl/Pepperminty-Wiki/issues/172 (has snippet of original code from Firefox & link to study from which the numbers are taken).
Parameters
- $text : string
-
The text to estimate for.
- $lang : string = "en"
-
The language code of the text - defaults to "en"
Return values
array<string|int, mixed> —An array in the form [ low_time, high_time ] in minutes