for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author jan huang <[email protected]>
* @copyright 2017
*
* @see https://www.github.com/janhuang
* @see https://fastdlabs.com
*/
namespace Processor;
use FastD\Swoole\Process;
use swoole_process;
class DemoProcessor extends Process
{
public function handle(swoole_process $swoole_process)
timer_tick(1000, function ($id) {
static $index = 0;
++$index;
echo $index.PHP_EOL;
if (3 === $index) {
timer_clear($id);
}
});