Skip to content

Instantly share code, notes, and snippets.

@fejese
Created December 3, 2014 13:10
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