• Starting from bin / swoft, read the source code of swoft framework (8) — console Prosser console processor


    Router and cliapp are bean objects generated during initialization of bean processor public function handle(): bool { if (!$this->application->beforeConsole()) { return false; } //Get routing bean object /** @var Router $router */ $router = bean(‘cliRouter’); //Register routing objects // Register console routes CommandRegister::register($router); //Print registration information CLog::info(‘Console command route registered (group %d, command %d)’, $router->groupCount(), […]

  • Test the performance of websocket asynchronous server by using the channel of spool


    The environment uses docker: Building the runtime environment of spool in docker The server side uses the code in the previous article: Using websocket server and client in spool Test program code: <?php use Swoole\Coroutine\Channel; use Swoole\Coroutine\Http\Client; use function Swoole\Coroutine\run; class Test { Protected $request; // total requests protected $requested = 0; protected $start_time; protected […]

  • Record recent interviews (PHP)


    Make a note of the interview questions that you have encountered recently. The companies are not big, so they only pick out some technical problems to record. PHP foundation related: How to compile PHP? Do you know anything about opcode? From the perspective of opcode, can you optimize the speed of PHP? How to implement […]

  • Swoole v4.6.0 release, support native curl coroutine client


    Swoole v4.6.0Version is released, which is also the first version update in 2021. Released as a Y version, this update also contains incompatible modifications and many new features. Let’s take a look at the changes? Downward incompatible changes fromv4.6.0Version will no longer be supportedPHP7.1 PHP official forPHP7.1The support of the government has already ended by […]

  • Spool v4.6.1 release, bug fix version


    v4.6.1Version is mainly a bug repair version, and there are no downward incompatible changes. In the last version, the native curl coroutine client was supported, but the option of PECL installation was omitted, which led to some users’ feedback that the native curl coroutine client could not be used normally and could only be solved […]

  • Why should hyperf turn off the short name of the spool coroutine


    It is mentioned in the server requirements of hyperf official documents Spool PHP extension > = 4.5, and short name is turned off Also, you can see it in the frequently asked questions in the documentSpool short name not closedThis is a tag. I want to ask why hyperf has to turn off the short […]

  • Phpmqtt v1.1.4 release, mqtt protocol analysis & coroutine client


    In v1.1.4, the logic of reconnection is optimized and thereconnect_delayConfigure parameters to let users set the delay time of reconnection. Previous versions were fixed3s, and now the default value is3s, which can be set by yourself use Simps\MQTT\Client; use Swoole\Coroutine; Coroutine\run(function () { $config = [ ‘host’ => ‘’, ‘port’ => 1883, ‘user_name’ => ”, […]

  • websocket & swoole & swoft


    1.Websocket 1. OSI seven layer and TCP / IP five layer model 2.socket Socket is actually the encapsulation of TCP / IP protocol. It is not a protocol, but an API The appearance of socket just makes it easier for programmers to use TCP / IP protocol stack. It is the abstraction of TCP / […]

  • coming! Real material design version of playing Android


    Everyone is familiar with playing Android. It’s an open source knowledge website of Hongyang. At present, many versions of apps based on playing Android open source API are just like Niumao. Well, after a period of painstaking cultivation, today we have a new version of the ship that we have never seen before. Design The […]

  • Phpmqtt V1.2.1 release, mqtt protocol analysis & coroutine client


    V1.2 mainly modifies the constructor parameters of client and the namespace of protocol, and optimizes the reconnection logic. Protocol Add a new layerProtocol, usingV3andV5To distinguish the mqtt protocol level. At the same timeSimps\MQTT\TypesAlso moved toProtocolNext, amend toSimps\MQTT\Protocol\Types。 1.1 Simps\MQTT\Protocol::pack(array $array) Simps\MQTT\ProtocolV5::pack(array $array) Simps\MQTT\ProtocolInterface::MQTT_PROTOCOL_LEVEL_3_1; Simps\MQTT\Types::CONNECT; 1.2 Simps\MQTT\Protocol\V3::pack(array $array) Simps\MQTT\Protocol\V5::pack(array $array) Simps\MQTT\Protocol\ProtocolInterface::MQTT_PROTOCOL_LEVEL_3_1; Simps\MQTT\Protocol\Types::CONNECT; Client The client used […]

  • Making asynchronous ORM framework of rust language comparable to mybatis


    Because mybatis is a replica of Java, the framework is temporarily named rbatis. A small number of functions are still in progress. GitHub linkgithub.com/rbatis/rbatis First of all, what are the products of bull force coax in the trust language? (recently, the popular front-end typescript runtime DeNO implemented by nodejs Dashen is expected to replace nodejs, […]

  • Hyperf releases v2.0.21, an enterprise level PHP micro service cloud native collaboration framework


    Update content This week, we added some new features, fixed bugs in some components, and continued to improve the stability of hyperf, which was released on2.0.21Version. It is recommended that you update this version with the following command. composer update “hyperf/*” -o Direct access to the official websitehyperf.ioOr documenthyperf.wikiView updates newly added #2857byservice-governanceNew componentsConsulOfACL Tokensupport. […]