<?php
pcntl_signal(SIGALRM, 'var_dump');
declare(ticks=100);
class Task {
public static function run() {
$isActive = true;
while ($isActive) {
usleep(0.05*1e6);
// complex business logic here
echo "..";
}
}
}
Task::run();
Fatal error: Uncaught Error: Call to undefined function pcntl_signal() in /in/0pPKt:3
Stack trace:
#0 {main}
thrown in /in/0pPKt on line 3
Process exited with code 255.