https://github.com/divineomega/php-reading-time
⏱ Calculates reading time for text
https://github.com/divineomega/php-reading-time
php-library reading reading-time time
Last synced: about 1 year ago
JSON representation
⏱ Calculates reading time for text
- Host: GitHub
- URL: https://github.com/divineomega/php-reading-time
- Owner: DivineOmega
- License: lgpl-3.0
- Created: 2018-04-07T15:32:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-03-26T18:20:50.000Z (about 6 years ago)
- Last Synced: 2024-05-02T01:50:15.236Z (about 2 years ago)
- Topics: php-library, reading, reading-time, time
- Language: PHP
- Size: 15.6 KB
- Stars: 17
- Watchers: 5
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⏱ PHP Reading Time
[](https://travis-ci.org/DivineOmega/php-reading-time)
[](https://coveralls.io/github/DivineOmega/php-reading-time?branch=master)
[](https://styleci.io/repos/128542116)
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).
```php
$readingTime = new ReadingTime($text);
$readingTime->seconds();
$readingTime->minutes();
$readingTime->setWordsPerMinute(240)->minutes();
```