| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2008-01-15 04:43 UTC] graced at wingsnw dot com
 Description: ------------ Short of using an experimental extension that's not likely to be available on a default install, there appears to be no way to disable/enable echoing of stdin content when reading it. A use case would be something like: <?php ob_implicit_flush(true); echo "Please enter your password: "; // code to disable echo here $password = fgets(STDIN); // code to re-enable echo here. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 10:00:02 2025 UTC | 
This seems beyond what we should be supporting in the core of PHP. I am sure there are ways of doing this on Windows. A quick search gets me the ScriptPW.Password component. It should be easy enough to trigger that via the COM extension. eg. $pwd = new Com('ScriptPW.Password');