Replies: 1 comment 1 reply
-
$tasks = generateTasks(5); // Example with 5 tasks // Map results back to original keys print_r($mappedResults); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a convenient way of mapping the output, if you have a dynamic amount of closures?
$result = Concurrency::run($data);
Ideally, id like this to respect the keys that was passed in the input:
['task1' => 'Result of task 1', 'task2' => 'Result of task2']
But it that doesn't seem to be the case, the output is not keyed to the keys of the array input, unless i'm missing something?
Edit: added a PR here:
#53135
Beta Was this translation helpful? Give feedback.
All reactions