-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
How to call custom php function?
<?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);