PHP code example of amphp / parallel-functions
1. Go to this page and download the library: Download amphp/parallel-functions library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
amphp / parallel-functions example snippets
use function Amp\ParallelFunctions\parallelMap;
$responses = parallelMap([
'https://google.com/',
'https://github.com/',
'https://stackoverflow.com/',
], function ($url) {
return file_get_contents($url);
});