summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_help.c
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-10-12 20:19:10 +0200
committerBob Weinand <bobwei9@hotmail.com>2016-10-12 20:19:10 +0200
commit37ae5f3931b60c55e5004b6da912c4a957bca274 (patch)
tree8ff0797739429943820f4f00c2ee0e3c481c68d6 /sapi/phpdbg/phpdbg_help.c
parentaf1bf873fe4fc70be17fa9f270e8f30666f2d2db (diff)
parent5aae01104f88f98f42fd997d360757651f7cc919 (diff)
downloadphp-git-37ae5f3931b60c55e5004b6da912c4a957bca274.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'sapi/phpdbg/phpdbg_help.c')
-rw-r--r--sapi/phpdbg/phpdbg_help.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c
index a3bcbd10a1..0943a7ea2c 100644
--- a/sapi/phpdbg/phpdbg_help.c
+++ b/sapi/phpdbg/phpdbg_help.c
@@ -339,6 +339,7 @@ phpdbg_help_text_t phpdbg_help_text[] = {
"**Starting and Stopping Execution**" CR
" **exec** set execution context" CR
+" **stdin** set executing script from stdin" CR
" **run** attempt execution" CR
" **step** continue execution until other line is reached" CR
" **continue** continue execution" CR
@@ -387,6 +388,7 @@ phpdbg_help_text_t phpdbg_help_text[] = {
" **-rr** Run execution context and quit after execution (not respecting breakpoints)" CR
" **-e** Generate extended information for debugger/profiler" CR
" **-E** Enable step through eval, careful!" CR
+" **-s** **-s=**, **-s**=foo Read code to execute from stdin with an optional delimiter" CR
" **-S** **-S**cli Override SAPI name, careful!" CR
" **-l** **-l**4000 Setup remote console ports" CR
" **-a** **-a**192.168.0.3 Setup remote console bind address" CR
@@ -397,6 +399,13 @@ phpdbg_help_text_t phpdbg_help_text[] = {
" **--** **--** arg1 arg2 Use to delimit phpdbg arguments and php $argv; append any $argv "
"argument after it" CR CR
+"**Reading from stdin**" CR CR
+
+"The **-s** option allows inputting a script to execute directly from stdin. The given delimiter "
+"(\"foo\" in the example) needs to be specified at the end of the input on its own line, followed by "
+"a line break. If **-rr** has been specified, it is allowed to omit the delimiter (**-s=**) and "
+"it will read until EOF. See also the help entry for the **stdin** command." CR CR
+
"**Remote Console Mode**" CR CR
"This mode is enabled by specifying the **-a** option. Phpdbg will bind only to the loopback "
@@ -635,6 +644,21 @@ phpdbg_help_text_t phpdbg_help_text[] = {
" Set the execution context to **/tmp/script.php**"
},
+{"stdin",
+"The **stdin** command takes a string serving as delimiter. It will then read all the input from "
+"stdin until encountering the given delimiter on a standalone line. It can also be passed at "
+"startup using the **-s=** command line option (the delimiter then is optional if **-rr** is "
+"also passed - in that case it will just read until EOF)." CR
+"This input will be then compiled as PHP code and set as execution context." CR CR
+
+"**Example**" CR CR
+
+" $P stdin foo" CR
+" <?php" CR
+" echo \"Hello, world!\\n\";" CR
+" foo"
+},
+
//*********** Does F skip any breakpoints lower stack frames or only the current??
{"finish",
"The **finish** command causes control to be passed back to the vm, continuing execution. Any "