1
0
mirror of https://github.com/danog/process.git synced 2024-11-26 20:24:43 +01:00
process/test/bin/worker.php

17 lines
221 B
PHP
Raw Normal View History

<?php
2018-10-15 06:16:09 +02:00
$content = \fread(STDIN, 1024);
2018-10-15 06:16:09 +02:00
$command = \explode(" ", $content);
2017-12-10 22:17:04 +01:00
2018-10-15 06:16:09 +02:00
if (\count($command) !== 2) {
2017-12-10 22:17:04 +01:00
exit(1);
}
2017-12-14 03:33:28 +01:00
if ($command[0] === "exit") {
2018-10-15 06:16:09 +02:00
echo \str_repeat(".", (int) $command[1]);
exit;
}
exit(1);