Collection classes with many useful methods - PHPCollection

Code
<?php

use PhpCollection\Sequence;

$data = ['-''----''--''---'];

$sequence = new Sequence($data);

$sequence->sortWith(function($a$b) {
    return 
strlen($a) - strlen($b);
});

foreach (
$sequence as $element) {
    echo 
$element PHP_EOL;
}
Result
-
--
---
----