[SOLVED] PHP Interactive Mode
Posted: Mon Sep 21, 2009 12:10 pm
I've been using PHP since PHP3, but somehow I've never really heard of the interactive mode flag before, and when I tried to use it... it doesn't work, sort of.
Anyway... I use: php -a
Then I type in some php code, ie: <?php print "Hi"; ?>
I have to press ctrl+d, enter, ctrl+d (Linux).. or ctrl+z, enter, ctrl+z (Windows)....... then it exits. I see sometimes people using something like:
php > here is where you'd enter code.
php > and here
php > and here..
Mine don't show any sort of "console" prompt I guess you could say. Any idea why not and how I can get it?
Anyway... I use: php -a
Then I type in some php code, ie: <?php print "Hi"; ?>
I have to press ctrl+d, enter, ctrl+d (Linux).. or ctrl+z, enter, ctrl+z (Windows)....... then it exits. I see sometimes people using something like:
php > here is where you'd enter code.
php > and here
php > and here..
Mine don't show any sort of "console" prompt I guess you could say. Any idea why not and how I can get it?