From eaff72f31b6322ff4b035b97af5ea1552b2281b7 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Wed, 5 Oct 2016 12:08:20 +0200 Subject: [PATCH 1/2] Remove phpdbg fix targeting 7.1 which landed in 7.0 --- sapi/phpdbg/phpdbg_list.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index 74d35c7ce91..6895bea43ef 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -316,17 +316,6 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) { dataptr = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), filename, strlen(filename)); ZEND_ASSERT(dataptr != NULL); - if (op_array->vars) { - int i; - /* un-intern these strings to prevent zend_restore_strings from invalidating our string pointers too early */ - for (i = 0; i < op_array->last_var; i++) { - zend_string **s = op_array->vars + i; - if (ZSTR_IS_INTERNED(*s)) { - *s = zend_string_init(ZSTR_VAL(*s), ZSTR_LEN(*s), 0); - } - } - } - dataptr->op_array = *op_array; if (dataptr->op_array.refcount) { ++*dataptr->op_array.refcount; From 4790da5475c80469eeaac777f3f04815648e3d96 Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Wed, 5 Oct 2016 12:14:02 +0200 Subject: [PATCH 2/2] Update run command for allowing STDIN --- sapi/phpdbg/phpdbg_help.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c index d01184b102d..a7385df21e7 100644 --- a/sapi/phpdbg/phpdbg_help.c +++ b/sapi/phpdbg/phpdbg_help.c @@ -810,21 +810,19 @@ phpdbg_help_text_t phpdbg_help_text[] = { {"run", "Enter the vm, starting execution. Execution will then continue until the next breakpoint " -"or completion of the script. Add parameters you want to use as $argv" CR CR +"or completion of the script. Add parameters you want to use as $argv. Add a trailing " +"**< filename** for reading STDIN from a file." CR CR "**Examples**" CR CR " $P run" CR " $P r" CR " Will cause execution of the context, if it is set" CR CR -" $P r test" CR -" Will execute with $argv[1] == \"test\"" CR CR +" $P r test < foo.txt" CR +" Will execute with $argv[1] == \"test\" and read from the foo.txt file for STDIN" CR CR "Note that the execution context must be set. If not previously compiled, then the script will " -"be compiled before execution." CR CR - -"Note that attempting to run a script that is already executing will result in an \"execution " -"in progress\" error." +"be compiled before execution." }, {"set",