Php is already in the 5.6 era, and the official team still hasn't made concessions on threads and Asynchronization... the era of Universal API .... A lot of things are not simply web pages. php is already in the 5.6 era. The official website still hasn't made concessions on threads and Asynchronization... the era of Universal API .... many things are no longer simply web pages.
Reply content:
Php has already been in the 5.6 era, and the official team has not yet made concessions on threads and Asynchronization... all of them are in the API era... a lot of things are no longer simply web pages.
PHP has many asynchronous methods, such
1. asynchronous request receiving http://php.net/manual/en/function.stream-select.php through IO multiplexing
2. Use php multi-process http://php.net/manual/en/book.pcntl.php
3. Use php multi-threaded http://php.net/manual/en/book.pthreads.php
4. Use php coroutine http://www.oschina.net/translate/cooperative-multitasking-using-coroutines-in-php
And so on.
Http://www.swoole.com/
The PHP High-Performance Network Communication Framework provides PHP asynchronous multi-threaded servers, asynchronous TCP/UDP network clients, asynchronous MySQL, database connection pool, AsyncTask, message queue, millisecond timer, asynchronous file read/write and asynchronous DNS query.
Swoole can be widely used in the Internet, mobile communications, enterprise software, online games, Iot, IOV, Smart Home, and other fields. Using PHP + Swoole as the network communication framework can greatly improve the efficiency of enterprise it r & D teams and focus more on developing innovative products.
Pthreads in PECL, or Baidu PHP pthreads
Using cli to perform a lot of data conversion, data upgrade, and data capturing, multithreading is quite good.
It's okay to start a sub-process. Why is it asynchronous? This is a problem with your own code implementation.