PHP code example of shtayeb / bookworm

1. Go to this page and download the library: Download shtayeb/bookworm 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/ */

    

shtayeb / bookworm example snippets



use SHTayeb\Bookworm\Bookworm;

$text = '...';
$time = (new Bookworm())->estimate($text);
echo $time; // 5 minutes

$word_count = (new Bookworm())->countWords($text);
echo $word_count; // 1,000

(new Bookworm())->estimate(string $text, string|array|bool $units = [ ' minute', ' minutes' ]);

return [
    /*
    |--------------------------------------------------------------------------
    | Bookworm Options
    |--------------------------------------------------------------------------
    | Here you may specify the configuration options that should be used
    |
    */

    'words_per_minute' =>200,
    'codewords_per_minute' => 200,
    'seconds_per_image' => 12

];
shell
php artisan vendor:publish --provider="SHTayeb\Bookworm\BookwormServiceProvider"