<?php
require_once 'vendor/autoload.php';
$fuse = new \Fuse\Fuse([
[
"title" => "Old Man's War",
"author" => "John Scalzi"
],
[
"title" => "The Lock Artist",
"author" => "Steve Hamilton"
],
[
"title" => "HTML5",
"author" => "Remy Sharp"
],
[
"title" => "Right Ho Jeeves",
"author" => "P.D Woodhouse"
],
], [
"keys" => [ "title", "author" ],
]);
$fuse->search('hamil');
/*
Array
(
[0] => Array
(
[title] => The Lock Artist
[author] => Steve Hamilton
)
[1] => Array
(
[title] => HTML5
[author] => Remy Sharp
)
)
*/