PHP Classes

File: src/Helpers/sort.php

Recommend this page to a friend!
  Classes of AccountKiller   Fuse   src/Helpers/sort.php   Download  
File: src/Helpers/sort.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Fuse
Fuzzy search of arrays using the Bitap algorithm
Author: By
Last change:
Date: 1 year ago
Size: 142 bytes
 

Contents

Class file image Download
<?php

namespace Fuse\Helpers;

function
sort(array $a, array $b): int
{
    return
$a['score'] <=> $b['score'] ?: $a['idx'] <=> $b['idx'];
}