PHP code example of crainios / ultimate-lorem-generator
1. Go to this page and download the library: Download crainios/ultimate-lorem-generator 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/ */
crainios / ultimate-lorem-generator example snippets
use UltimateLoremGenerator\Generator;
$generator = new Generator();
// 120 mots, 4 paragraphes, thème botanique, sans ponctuation, texte brut.
echo $generator->generate(120, 4);
// Les cinq paramètres.
echo $generator->generate(120, 4, 'science-fiction', 'french', 'markdown');
generate(
int $words,
int $paragraphs,
Theme|string $theme = Theme::BOTANIQUE,
PunctuationStyle|string|bool $punctuation = false,
OutputFormat|string $format = OutputFormat::TEXT,
): string