Can user input be requested/retrieved from CLI, ie stdin()?

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!

Moderator: General Moderators

Post Reply
techniq
Forum Newbie
Posts: 6
Joined: Sat May 18, 2002 12:15 pm
Location: US

Can user input be requested/retrieved from CLI, ie stdin()?

Post by techniq »

I would like to prompt for user input in a php cli script, like stdin(), then assign the input to variables. Is this possible with PHP. I'm running 4.2.1(Windows & Linux x86).

Thanks.
User avatar
EvilWalrus
Site Admin
Posts: 209
Joined: Thu Apr 18, 2002 3:21 pm
Location: Springmont, PA USA

Post by EvilWalrus »

check out scanf() and related functions in the manual
Post Reply