1. Go to this page and download the library: Download many/gearman 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/ */
many / gearman example snippets
public function fire($job, $data)
{
$result=$data[0] + $data[1];
//模拟任务消耗时间
sleep(2);
echo "Client results:{$result}\n";
return $result;
}