Skip to content

Instantly share code, notes, and snippets.

@b0n
Created October 5, 2012 00:18
Show Gist options
  • Save b0n/3837285 to your computer and use it in GitHub Desktop.
Save b0n/3837285 to your computer and use it in GitHub Desktop.
コマンドで実行されたPHPでユーザー入力を待つ方法
<?php
/**
* @see http://www.php.net/manual/en/features.commandline.io-streams.php
*/
$input = fgets(STDIN,4096);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment