PHP code example of eyefi / net_gearman
1. Go to this page and download the library: Download eyefi/net_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/ */
eyefi / net_gearman example snippets
php
$client = new \Net\Gearman\Client();
$client->addServer();
$result = $client->doNormal('replace', 'PHP is best programming language!');
$client->doBackground('long_task', 'PHP rules... PHP rules...');
php
$function = function($payload) {
return str_replace('java', 'php', $payload);
};
$worker = new \Net\Gearman\Worker();
$worker->addServer();
$worker->addFunction('replace', $function);
$worker->work();