关于php:Swoole-v457-版本发布新增enableswoolejson编译选项

8次阅读

共计 1115 个字符,预计需要花费 3 分钟才能阅读完成。

Swoole 正在参加 2020 年度 OSC 中国开源我的项目评比,评比曾经来到了最初一周,还有没给 Swoole 投票的小伙伴请点击下方链接投出您的一篇:https://www.oschina.net/p/swoole-server

在上个版本中增加的 swoole_substr_json_decode 函数,因为少部分用户的扩大依赖程序问题,所以增加了一个编译选项 --enable-swoole-json,用于启用 swoole_substr_json_decode 反对

在此版本如果须要应用此函数,须要在编译时加上此选项。同时此版本还反对了负偏移量

$val = json_encode(['hello' => 'swoole']);
$str = pack('N', strlen($val)) . $val . "\r\n";
$l = strlen($str) - 6;
var_dump(json_decode(substr($str, 4, $l), true));
var_dump(swoole_substr_json_decode($str, 4, $l, true));
var_dump(swoole_substr_json_decode($str, -(strlen($str)-4), $l, true));

更新内容如下:

新增 API

  • Coroutine\Socket 客户端新增 writeVector, writeVectorAll, readVector, readVectorAll 办法 (#3764) (@huanghantao)

加强

  • 为 server->stats 减少 task_worker_num 和 dispatch_count (#3771) (#3806) (@sy-records) (@matyhtf)
  • 增加了扩大依赖项,包含 json, mysqlnd, sockets (#3789) (@remicollet)
  • 限度 server->bind 的 uid 最小值为 INT32_MIN (#3785) (@sy-records)
  • 为 swoole_substr_json_decode 增加了编译选项,反对负偏移量 (#3809) (@matyhtf)
  • 反对 CURL 的 CURLOPT_TCP_NODELAY 选项 (swoole/library#65) (@sy-records) (@deminy)

修复

  • 修复同步客户端连贯信息谬误 (#3784) (@twose)
  • 修复 hook scandir 函数的问题 (#3793) (@twose)
  • 修复协程屏障 barrier 中的谬误 (swoole/library#68) (@sy-records)

内核

  • 应用 boost.stacktrace 优化 print-backtrace (#3788) (@matyhtf)

正文完
 0