PHP code example of honeystone / reading-time

1. Go to this page and download the library: Download honeystone/reading-time library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

honeystone / reading-time example snippets


//average reading time
reading_time($text); //5m

//fast reading time
reading_time()->fast($text) //4m

//slow reading time
reading_time()->slow($text) //6m

//figure(['short' -> false], true);

//all available config & defaults
reading_time()->configure([
    'slowWpm' => 180,
    'averageWpm' => 240,
    'fastWpm' => 320,
    'additionalCharacters' => '',
    'seconds' => false,
    'format' => null,
    'short' => true,
    'countHtml' => false,
]);