Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- stream_set_blocking(STDIN, 0);
- while(1) {
- while ( $input == '' ) {
- $input = trim(fgets(STDIN));
- }
- if ( strtolower($input) == 'exit' ) {
- die();
- }
- echo $input."\r\n";
- $input = '';
- }
- ?>
Add Comment
Please, Sign In to add comment