Basic Gearman client and worker, background

Example #1 Basic Gearman client and worker, background

This example shows a very simple client and worker. The client sends a string
to the job server as a background job, and the worker reverses the string.
Note that since the work is performed asynchronously, the client does not
wait for the job to complete and exits (and hence the client never receives the results).

<?php

# create our client object$gmclient= new GearmanClient();

# add the default server (localhost)$gmclient->addServer();

# run reverse client in the background$job_handle = $gmclient->doBackground("reverse", "this is a test");