PHP code example of hracik / php-create-avatar-from-text

1. Go to this page and download the library: Download hracik/php-create-avatar-from-text 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/ */

    

hracik / php-create-avatar-from-text example snippets


use Hracik\CreateAvatarFromText;

$options = [
    'size' => 64, 
    'text-case' => 'upper', 
    'text-modification' => 'initials', 
    'font-weight' => 'bold', 
    'color-scheme' => 'light',
];
$svg = CreateAvatarFromText::($string, $options);

./vendor/bin/phpunit --bootstrap vendor/autoload.php tests

./vendor/bin/phpunit.bat --bootstrap vendor/autoload.php tests