Home >php教程 >PHP源码 >Zan is a network service framework based on PHP coroutines, providing the simplest way to develop high-concurrency HTTP services or SOA services for C10K+.

Zan is a network service framework based on PHP coroutines, providing the simplest way to develop high-concurrency HTTP services or SOA services for C10K+.

WBOY
WBOYOriginal
2016-08-04 08:53:371543browse
跳至 [1] [全屏预览]
<?php
namespace Com\Youzan\ZanHttpDemo\Controller\Index;
use Com\Youzan\ZanHttpDemo\DemoModule\Service\System;
use Zan\Framework\Foundation\Domain\HttpController as Controller;
class IndexController extends Controller {
    public function index()
    {
        $systemService = new System(); 
        yield $systemService->sleep(20);
        $this->assign('testResult', 'hello, zanphp!');
        yield $this->display('DemoModule/Test');
    }
}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn