$pid) {
die(__FILE__ . ':' . __LINE__ . "\n");
}
if ($pid) {
echo "fork $pid
\n";
sleep(1);
echo "exit parent process
\n";
exit();
}
sleep(3);
echo "Child
\n";
sleep(3);
echo "Child
\n";
sleep(3);
echo "Child
\n";
}
}
$apc = new AsyncPC();
$apc->run();