PHP code example of spekulatius / php-char-combinator

1. Go to this page and download the library: Download spekulatius/php-char-combinator 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/ */

    

spekulatius / php-char-combinator example snippets


use Spekulatius\PHPCharCombinator\Combinator;

$combinator = new Combinator();

// Generate combinations of lengths 1 to 3 using ASCII characters
$asciiChars = $combinator->prepareAsciiChars();
$combinations = $combinator->generateCombinations($asciiChars, 1, 3);

foreach ($combinations as $combination) {
    echo $combination . "\n";
}

$asciiChars = $combinator->prepareAsciiChars();

$nonAlphanumericChars = $combinator->prepareNonAlphanumericAsciiChars();