title: Catch fatal error on gearman php workers
body: <p>When worker job failed by fatal error, I cant catch this error, so I cant send result to gearman server, and server does not remove job from queue and it try to doing this job again, supervisor restart worker and worker fail agian. So i can receive infinite loop until restart server : </p>
  
  <p>gearman send job to worker -> worker failed by fatal error -> job not remove from queue -> supervisor restart worker -> gearman send job to worker -> ...</p>
  
  <p>(of course, only if I can not quickly fix error in php). How can i remove this job from queue (or fix this problem another way)?</p>
  
  <p>Simple example:</p>
  
  <pre><code>$worker-&gt;addFunction('test', 'test');
  while($worker-&gt;work());
  
  function test()
  {
    $a = [];
    //fatal error
    $a-&gt;fatal();
  }
  </code></pre>