Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example how to wait for a letter
<?php
echo "pause\n";
$stdin = fopen('php://stdin', 'r');
$c = -1;
while ($c != '~') {
if ($c != -1) {
echo "still waiting...\n";
}
$c = fgetc($stdin);
}
echo "continue\n";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment