Question

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

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


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

@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.

PHP has no multi-threaded or concurrency support.