note 49937 added to function.readline

From: Date: Sat, 12 Feb 2005 19:40:36 +0000
Subject: note 49937 added to function.readline
Groups: php.notes 
Request: Send a blank email to php-notes+get-84902@lists.php.net to get a copy of this message
I have my own readline function for Windows: <?php function readline($prompt="") { echo $prompt; $o = ""; $c = ""; while ($c!="\r"&&$c!="\n") { $o.= $c; $c = fread(STDIN, 1); } fgetc(STDIN); return $o; } ?> With many of the other functions posted above, it will only work once, and will immediately return while returning nothing afterwards. ---- Me;) ---- Manual Page -- http://www.php.net/manual/en/function.readline.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49937 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49937&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49937&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49937&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49937&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49937&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49937&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84902) next »