This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
Argv::parse(); | |
$help = Argv::getOption('h|help'); | |
$configFile = Argv::getOption('c|config-file', '/etc/hosts'); | |
$configSave = Argv::getOption('w|config-save'); | |
$servers = explode(',', Argv::getOption('s|servers')); | |
$domains = explode(',', Argv::getOption('d|domains')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PHP生成器(Generator)和Swoole异步客户端相结合的示例 | |
* 如下框架也是基于类似的原理来实现协程操作 | |
* - https://github.com/Tencent/tsf | |
* - https://github.com/youzan/zanphp | |
*/ | |
// 调度器 |