Lines Matching refs:code

185 			char *code;  in cli_get_prompt()  local
188 code = estrndup(prompt_spec + 1, prompt_end - prompt_spec - 1); in cli_get_prompt()
192 zend_eval_stringl(code, prompt_end - prompt_spec - 1, NULL, "php prompt code" TSRMLS_CC); in cli_get_prompt()
195 efree(code); in cli_get_prompt()
207 static int cli_is_valid_code(char *code, int len, char **prompt TSRMLS_DC) /* {{{ */ in cli_is_valid_code() argument
220 switch(code[i]) { in cli_is_valid_code()
259 if (code[i+1] == '/') { in cli_is_valid_code()
264 if (code[i+1] == '*') { in cli_is_valid_code()
280 if (code[i+1] == '>') { in cli_is_valid_code()
289 if (i + 2 < len && code[i+1] == '<' && code[i+2] == '<') { in cli_is_valid_code()
301 if (code[i] == '\\') { in cli_is_valid_code()
304 if (code[i] == '\'') { in cli_is_valid_code()
313 if (code[i] == '\\') { in cli_is_valid_code()
316 if (code[i] == '"') { in cli_is_valid_code()
325 if (code[i] == '\n') { in cli_is_valid_code()
330 if (code[i-1] == '*' && code[i] == '/') { in cli_is_valid_code()
336 switch(code[i]) { in cli_is_valid_code()
347 heredoc_tag = code+i; in cli_is_valid_code()
354 …if (code[i - (heredoc_len + 1)] == '\n' && !strncmp(code + i - heredoc_len, heredoc_tag, heredoc_l… in cli_is_valid_code()
356 …} else if (code[i - (heredoc_len + 2)] == '\n' && !strncmp(code + i - heredoc_len - 1, heredoc_tag… in cli_is_valid_code()
362 if ((CG(short_tags) && !strncmp(code+i-1, "<?", 2)) in cli_is_valid_code()
363 || (CG(asp_tags) && !strncmp(code+i-1, "<%", 2)) in cli_is_valid_code()
364 || (i > 3 && !strncmp(code+i-4, "<?php", 5)) in cli_is_valid_code()
590 char *code = emalloc(size); in readline_shell_run() local
649 code = erealloc(code, size); in readline_shell_run()
651 memcpy(&code[pos], line, len); in readline_shell_run()
653 code[pos] = '\n'; in readline_shell_run()
654 code[++pos] = '\0'; in readline_shell_run()
664 if (!cli_is_valid_code(code, pos, &prompt TSRMLS_CC)) { in readline_shell_run()
678 zend_eval_stringl(code, pos, NULL, "php shell code" TSRMLS_CC); in readline_shell_run()
699 efree(code); in readline_shell_run()