# Accessing keyboard input in Interactive PHP

- Thread: https://externals.io/message/10785
- Original archive: https://news-web.php.net/php.internals/10785
- Started by Larry Adams on 2004-06-26T15:30:00+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #10785 — Larry Adams — 2004-06-26T15:30:00+00:00

URL: https://externals.io/message/10785#10785

Ok,

So I am running PHP in interactive mode utilizing the PROCESS command line
option -F.  I type the following command:

c:\php\php.exe -a -F myfile.php

When I run this command, I receive the "Interactive Mode Enabled" prompt.
My question is, once I start keying in information and the program
"myfile.php" is called, how do I get to the information that I just typed in
on STDIN?  If I attempt to use fgets(STDIN,255);, it does not get the first
command only my next one.  If I attempt to use the $_SERVER[...] variables,
I only get information on "myfile.php" and not the input line I typed in.

Let me explain.

C:\i>c:\php\php.exe -a -F myfile.php
Interactive mode enabled

test <cr>
// my function myfile.php is now called.  The question is how do I retreive
the input line "test" from myfile.php????

Thanks in Advance,

Larry Adams
