Requirements:
- PHP 7.1 or higher
Installation:
composer require drboboev/sortwords
Usage:
Add class to your code:
use drboboev\SortWords\SortWords;Create object:
$sortWords = new SortWords();Run function sort() with $str as argument:
$string = $sortWords->sort($str);sort() function returns string with sorted words.