1. Go to this page and download the library: Download andares/adarts 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/ */
andares / adarts example snippets
use Adarts\Dictionary;
// ...这里是从mysql中读取词条列表到$collection变量的1000行代码
$collection = MySQL::get();
$dict = new Dictionary();
foreach ($collection as $word) {
$dict->add($word);
}
$dict->confirm();
$result = $dict->seek('get out! asshole!')->current();
if ($result) {
throw new \LogicException('you could not say ' . $dict->getWordByState($result));
}
foreach ($dict->seek('get out! asshole!') as $result) {
echo "you could not say ' . $dict->getWordByState($result);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.