note 98520 added to features.commandline.interactive
| From: | Anonymous at osu1 dot php dot net | Date: | Sun, 20 Jun 2010 19:56:15 +0000 |
| Subject: | note 98520 added to features.commandline.interactive | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-170333@lists.php.net to get a copy of this message | ||
Just a few more notes to add...
1) Hitting return does literally mean "execute this command". Semicolon to note end of
line is still required. Meaning, doing the following will produce a parse error:
php > print "test"
php > print "asdf";
Whereas doing the following is just fine:
php > print "test"
php > ."asdf";
2) Fatal errors may eject you from the shell:
name@local:~$ php -a
php > asdf();
Fatal Error: call to undefined function...
name@local:~$
3) User defined functions are not saved in history from shell session to shell session.
4) Should be obvious, but to quit the shell, just type "quit" at the php prompt.
5) In a sense, the shell interaction can be thought of as linearly following a regular php file,
except it's live and dynamic. If you define a function that you've already defined
earlier in your current shell, you will receive a fatal "function already defined" error
only upon entering that closing bracket. And, although "including" a toolset of custom
functions or a couple of script addon php files is rather handy, should you edit those files and
wish to "reinclude" it again, you'll cause a fatal "function x already
defined" error.
----
Server IP: 69.147.83.197
Probable Submitter: 70.124.94.109
----
Manual Page -- http://www.php.net/manual/en/features.commandline.interactive.php
Edit -- https://master.php.net/note/edit/98520
Del: integrated -- https://master.php.net/note/delete/98520/integrated
Del: useless -- https://master.php.net/note/delete/98520/useless
Del: bad code -- https://master.php.net/note/delete/98520/bad+code
Del: spam -- https://master.php.net/note/delete/98520/spam
Del: non-english -- https://master.php.net/note/delete/98520/non-english
Del: in docs -- https://master.php.net/note/delete/98520/in+docs
Del: other reasons-- https://master.php.net/note/delete/98520
Reject -- https://master.php.net/note/reject/98520
Search -- https://master.php.net/manage/user-notes.php