diff --git a/ext/readline/readline_cli.c b/ext/readline/readline_cli.c index 8fbe93d648953..8b5e6a88956f9 100644 --- a/ext/readline/readline_cli.c +++ b/ext/readline/readline_cli.c @@ -649,7 +649,7 @@ static int readline_shell_run(void) /* {{{ */ len = strlen(line); - if (line[0] == '#' && line[1] != '[') { + if (line[0] == '#' && line[1] != '[' && pos == 0) { char *param = strstr(&line[1], "="); if (param) { zend_string *cmd; @@ -661,7 +661,6 @@ static int readline_shell_run(void) /* {{{ */ add_history(line); zend_string_release_ex(prompt, 0); - /* TODO: This might be wrong! */ prompt = cli_get_prompt("php", '>'); continue; }