Swoole-1.8.6 has been released to fix PHP7 problems

Source: Internet
Author: User
Swoole-1.8.6 has been released to fix PHP7 related issues 1.8.6 version is an important BUG fix version, it mainly fixes memory leaks and crashes in clients such as HttpServer, TCPClient, HttpClient, and Redis in the PHP7 environment. In addition, MySQL 1.8.6 is completely reconstructed and provides a brand new object-oriented API that completely removes the dependency on PHP mysqli and mysqlnd.

We recommend that all swoole developers upgrade to this version.

Main updates
  • Fixed the error in changing the zval type when the Value of the Swoole \ Server-> set method in the correlated index array is NULL.

  • Update the third parameter of the Swoole \ Server-> task method. you can directly input the callback function.

  • Resolved the problem that Swoole \ WebSocket \ Server crashed when receiving malicious requests to improve stability.

  • Restructured the Swoole \ MySQL client, removed the dependency on mysqli and mysqlnd, and provided an object-oriented API

  • Set Swoole \ Http \ Client to built-in, and no additional compilation parameters are required.

  • Adjust the memory recovery time of Swoole \ Client and Swoole \ Http \ Client, and reclaim memory resources when the connection is closed

  • Added the cache for swoole_async_dns_lookup query results.

  • Optimizes the performance of Swoole \ WebSocket \ Server and reduces memory replication twice.

  • Remove Swoole \ Http \ Server-> setGlobal method

  • Fixed the problem where the onClose callback function was not executed in the Worker process when the close operation was executed in the Task process.

  • Fixed the problem where data was not cleared after Swoole \ Table deleted the KEY.

  • Added support for SSL and TLS certificate chains

  • Remove gcc aio

  • Fixed problems related to asynchronous file read/write functions.

New MySQL asynchronous client
$db = new swoole_mysql;$server = array(    'host' => '192.168.56.102',    'user' => 'test',    'password' => 'test',    'database' => 'test',);$db->connect($server, function ($db, $r) {    if ($r === false) {        var_dump($db->connect_errno, $db->connect_error);        die;    }    $sql = 'show tables';    $db->query($sql, function(swoole_mysql $db, $r) {        global $s;        if ($r === false)        {            var_dump($db->error, $db->errno);        }        elseif ($r === true )        {            var_dump($db->affected_rows, $db->insert_id);        }        var_dump($r);        $db->close();    });});

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.