src/Support/Arr.php
/**
	 * Sort the array using the given callback or "dot" notation.
	 *
	 * @param array $array
	 * @param callable|string $callback
	 * @param int $flags The sorting algorithm to use
	 * @return array
	 */
Sort the array using the given callback or "dot" notation.
@param array $array
@param callable|string $callback
@param int $flags The sorting algorithm to use
@return array
Sort the array using the given callback or " dot " notation . @param array $array @param callable|string $callback @param int $flags The sorting algorithm to use @return array
public static function sort($array, $callback, $flags = SORT_REGULAR) {
		$results = array();
		foreach ($array as $key => $value) {
			$results[$key] = $callback($value, $key);
		}
		asort($results, $flags);
		foreach (array_keys($results) as $key) {
			$results[$key] = $array[$key];
		}
		return $results;
	}
public static function sort ( $ array , $ callback , $ flags = SORT_REGULAR ) { $ results = array ( ) ; foreach ( $ array as $ key => $ value ) { $ results [ $ key ] = $ callback ( $ value , $ key ) ; } asort ( $ results , $ flags ) ; foreach ( array_keys ( $ results ) as $ key ) { $ results [ $ key ] = $ array [ $ key ] ; } return $ results ; }
Sort the array using the given callback or "dot" notation.
Sort the array using the given callback or " dot " notation .