Skip to content

DivineOmega/php-reading-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⏱ PHP Reading Time

Build Status Coverage Status StyleCI

This PHP library lets you easily calculate the reading time for a piece of text.

Installation

You can install PHP Reading Time using Composer, as follows.

composer require divineomega/php-reading-time

Usage

The following examples show how you can use PHP Reading Time to calculate the reading time in minutes or seconds. You can also set a reading speed in words per minute (default: 200 wpm).

$readingTime = new ReadingTime($text);

$readingTime->seconds();
$readingTime->minutes();

$readingTime->setWordsPerMinute(240)->minutes();