Skip to content

Parallel requests #386

Answered by veewee
joaopbnogueira asked this question in Q&A
Discussion options

You must be logged in to vote

It is possible if you use ext-fibers (which will be in core starting from php 8.1). It can also be installed standalone on other php versions.

Next, you'll need to create a custom fiber-based http handle.

Here is a sample implementation:
https://github.com/php-soap/async-transport

Note : this is code for version 2 of this soap-client. You'll need to use the old interfaces instead.

Note 2 : this will not be parallel, but rather concurrent in a non-blocking way. However, it is based on httplug promises, which require a blocking wait() call at some point. You might be better of using amp http client or guzzle pools instead.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joaopbnogueira
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants