PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I want to take a password from STDIN for a command line tool I'm making.
Being a password I don't want the text to be displayed as it is typed...
Can I do that with PHP for CLI?
I don't think you can do that with vanilla PHP. There might be an extension to help out though.
Or, super long shot, you might be able to set the STDIN stream as non-blocking, detect when a character comes in, then use fputs(STDOUT) to print a backspace followed by a * .. Tricky to code that though.