PHP code example of divineomega / php-word-info

1. Go to this page and download the library: Download divineomega/php-word-info 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/ */

    

divineomega / php-word-info example snippets


$word = new Word('cat');

$rhymes = $word->rhymes();
$halfRhymes = $word->halfRhymes();
$portmanteaus = $word->portmanteaus();

$numberOfSyllables = $word->syllables();    // Returns an integer
$isOffensive = $word->offensive();          // Returns true/false
$plural = $word->plural();                  // Returns `Word` object
$singular = $word->singular();              // Returns `Word` object

composer