Skip to content

Instantly share code, notes, and snippets.

@fejese
Created December 3, 2014 13:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save fejese/59184e28545287d33174 to your computer and use it in GitHub Desktop.
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