Question

How create threads with php in a VPS Ubuntu12.04?

Posted June 20, 2014 2.4k views
I want to create a api call(SOAP) and i need threads to do it faster. How can i create a script with multiple threads in php? thanks

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers
PHP has no multi-threaded or concurrency support.
@bphelpsen is mostly correct. http://php.net/manual/en/book.pcntl.php ^^ This will allow you to manage processes, thereby allowing you to fork off a process. Not the same a threading, but a well-coded script could fork off other workers and have them working at the same time.
Submit an Answer