mirror of
https://github.com/dunglas/frankenphp.git
synced 2025-12-24 13:38:11 +08:00
13 lines
347 B
PHP
13 lines
347 B
PHP
<?php
|
|
|
|
$handleFunc = function ($task) {
|
|
var_dump($task);
|
|
echo $_SERVER['CUSTOM_VAR'] ?? 'no custom var';
|
|
};
|
|
|
|
$maxTasksBeforeRestarting = 1000;
|
|
$currentTask = 0;
|
|
|
|
while(frankenphp_handle_task($handleFunc) && $currentTask++ < $maxTasksBeforeRestarting) {
|
|
// Keep handling tasks until there are no more tasks or the max limit is reached
|
|
} |