Skip to content

Commit fe49fd7

Browse files
committed
Update NEWS
Also add missing include.inc test file
1 parent fe378c2 commit fe49fd7

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

NEWS

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ PHP NEWS
1919

2020
- phpdbg:
2121
. Properly allow for stdin input from a file. (Bob)
22+
. Add -s command line option / stdin command for reading script from stdin.
23+
(Bob)
2224

2325
- Session:
2426
. Fixed bug #73273 (session_unset() empties values from all variables in which

sapi/phpdbg/phpdbg.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,12 @@ int main(int argc, char **argv) /* {{{ */
20402040
zend_objects_store_mark_destructed(&EG(objects_store));
20412041
}
20422042

2043+
if (PHPDBG_G(exec) && !memcmp("-", PHPDBG_G(exec), 2)) { /* i.e. execution context has been read from stdin - back it up */
2044+
phpdbg_file_source *data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(exec), PHPDBG_G(exec_len));
2045+
backup_phpdbg_compile = zend_string_alloc(data->len + 2, 1);
2046+
sprintf(ZSTR_VAL(backup_phpdbg_compile), "?>%.*s", (int) data->len, data->buf);
2047+
}
2048+
20432049
/* backup globals when cleaning */
20442050
if ((cleaning > 0 || remote) && !quit_immediately) {
20452051
settings = calloc(1, sizeof(zend_phpdbg_globals));
@@ -2099,12 +2105,6 @@ int main(int argc, char **argv) /* {{{ */
20992105
wrapper->wops->stream_opener = PHPDBG_G(orig_url_wrap_php);
21002106
}
21012107

2102-
if (PHPDBG_G(exec) && !memcmp("-", PHPDBG_G(exec), 2)) { /* i.e. execution context has been read from stdin - back it up */
2103-
phpdbg_file_source *data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(exec), PHPDBG_G(exec_len));
2104-
backup_phpdbg_compile = zend_string_alloc(data->len + 2, 1);
2105-
sprintf(ZSTR_VAL(backup_phpdbg_compile), "?>%.*s", (int) data->len, data->buf);
2106-
}
2107-
21082108
zend_try {
21092109
php_module_shutdown();
21102110
} zend_end_try();

sapi/phpdbg/tests/include.inc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
3+
echo 1;

0 commit comments

Comments
 (0)