Skip to content

Instantly share code, notes, and snippets.

@kelunik
Created March 5, 2018 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kelunik/a44236c2ab82dabf204c303cd7ad4d0a to your computer and use it in GitHub Desktop.
Save kelunik/a44236c2ab82dabf204c303cd7ad4d0a to your computer and use it in GitHub Desktop.
<?php
require __DIR__ . "/vendor/autoload.php";
$http = new Amp\Artax\Client;
$promises = [
async $http->request("https://google.com/"),
async $http->request("https://stackoverflow.com/"),
];
$responses = await $promises;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment