Files
archived-frankenphp/testdata/tasks/task-dispatcher-array.php
Alliballibaba d54f736db7 simplifications
2025-10-26 20:52:19 +01:00

17 lines
393 B
PHP

<?php
require_once __DIR__ . '/../_executor.php';
return function () {
$taskCount = $_GET['count'] ?? 0;
$workerName = $_GET['worker'] ?? '';
for ($i = 0; $i < $taskCount; $i++) {
frankenphp_send_request([
'task' => "array task$i",
'worker' => $workerName,
'index' => $i,
]);
}
echo "dispatched $taskCount tasks\n";
};