src/Helpers/Arrays.php
public static function orderBy(): array
    {
        $args = \func_get_args();
        $data = array_shift($args);
        foreach ($args as $n => $field) {
            if (\is_string($field)) {
                $tmp = [];
                foreach ($data as $key => $row) {
                    $tmp[$key] = $row[$field];
                }
                $args[$n] = $tmp;
            }
        }
        $args[] = &$data;
        array_multisort($args);
        return array_pop($args);
    }
public static function orderBy(): array
    {
        $args = \func_get_args();
        $data = array_shift($args);
        foreach ($args as $n => $field) {
            if (\is_string($field)) {
                $tmp = [];
                foreach ($data as $key => $row) {
                    $tmp[$key] = $row[$field];
                }
                $args[$n] = $tmp;
            }
        }
        $args[] = &$data;
        array_multisort($args);
        return array_pop($args);
    }
public static function orderBy ( ) : array { $ args = \ func_get_args ( ) ; $ data = array_shift ( $ args ) ; foreach ( $ args as $ n => $ field ) { if ( \ is_string ( $ field ) ) { $ tmp = [ ] ; foreach ( $ data as $ key => $ row ) { $ tmp [ $ key ] = $ row [ $ field ] ; } $ args [ $ n ] = $ tmp ; } } $ args [ ] = & $ data ; array_multisort ( $ args ) ; return array_pop ( $ args ) ; }
Order array by arguments

@return  array
Order array by arguments