PhpStorm配置phpunit测试环境


### 一、配置php环境 打开File >> Settings,新建一个php版本为7.2的环境 ![](http://image.rdhonor.com/2018/09/17/5au0rwy0wvqr8akb8wuwuyht.png) ![](http://image.rdhonor.com/2018/09/17/87nhv53rnd5wfetuf9i5y95a.png) ![](http://image.rdhonor.com/2018/09/17/3jj81tovehb863d4jtkid9xj.png)![](http://image.rdhonor.com/2018/09/17/kkady87svls48nj4zke4v47y.png) ![](http://image.rdhonor.com/2018/09/17/qrszqejkxhm4sblhuoi7784c.png) ### 二、配置phpunit #### 2.1选择phpunit的位置 ![](http://image.rdhonor.com/2018/09/17/dh71amdn8u32mri5m0uwo5a3.png) ![](http://image.rdhonor.com/2018/09/17/we0bdkxh8bbqmwugm2sd351i.png) #### 2.2选择phpunit的配置文件 ![](http://image.rdhonor.com/2018/09/17/84xqr1b9a16cro8w3sw3r1zm.png) ![](http://image.rdhonor.com/2018/09/17/wc68n8livkuawpirsmtkwg9f.png) #### 2.3运行测试 ![](http://image.rdhonor.com/2018/09/17/wqbmx79ek3nczaqoyrcniej4.png) ![](http://image.rdhonor.com/2018/09/17/iice0dcnozluiib4onq3n2cx.png)

Swoole Process Manager - swoole学习指北(一)


Swoole process manager can be used to replace PHP pcntl extension. Compare with PHP pcntl, Swoole process manager provides more features:

  • Interprocess communication based on unixsock, with read/write or push/pop API.
  • Redirect standard input and output
  • The child process can use swoole_event callbacks.
  • Exec API enable the child process execute Linux applications and communicate with parent process


shell数组和字典


``` #!/bin/bash echo "shell定义字典" #必须先声明 declare -A dic dic=([key1]="value1" [key2]="value2" [key3]="value3") #打印指定key的value echo ${dic["key1"]} #打印所有key值 echo ${!dic[*]} #打印所有value echo ${dic[*]} #遍历key值 for key in $(echo ${!dic[*]}) do echo "$key : ${dic[$key]}" done echo "shell定义数组" #数组 list=("value1" "value2" "value3") #打印指定下标 echo ${list[1]} #打印所有下标 echo ${!list[*]} #打印数组下标 echo ${list[*]} #数组增加一个元素 list=("${list[@]}" "value3") ```