1. Go to this page and download the library: Download ifcanduela/abbrev library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ifcanduela / abbrev example snippets
use ifcanduela\abbrev\Abbrev;
$abbrev = new Abbrev(
'foo',
'bar',
['baz', 'foobar', ['barbaz']],
);
$abbrev = new Abbrev(['ape', 'aperture', 'apprentice'], 'albino', 'append');
$match = $abbrev->match('ap'); // there is not unambiguous match
// => false
$match = $abbrev->match('al'); // there is only one possible match
// => "albino"