I think it's worth noting that this function will not return the unique id specified by a client request unless GEARMAN_WORKER_GRAB_UNIQ is specified as an option to the worker instance as follows ...
<?php
$worker= new GearmanWorker();
$worker->addServer();
$worker->addOptions(GEARMAN_WORKER_GRAB_UNIQ);
?>