<?php
require __DIR__ . '/vendor/autoload.php';
use function Amp\ParallelFunctions\parallelMap;
use function Amp\Promise\wait;
function myTestFunction($str){
//returns test
return substr($test, 0, -1);
}
$responses = wait(parallelMap([
'test1',
'test2',
'test3',
], function ($str) {
return myTestFunction($strt);
}));
var_dump($responses);
How to call custom php function?