{'z', 1, "load zend_extension"},
/* phpdbg options */
{'q', 0, "no banner"},
- {'e', 1, "exec"},
{'v', 0, "disable quietness"},
{'s', 0, "enable stepping"},
{'b', 0, "boring colours"},
/* begin phpdbg options */
- case 'e': { /* set execution context */
- exec_len = strlen(php_optarg);
- if (exec_len) {
- if (exec) {
- free(exec);
- }
- exec = strdup(php_optarg);
- }
- } break;
-
case 'S': { /* set SAPI name */
if (sapi_name) {
free(sapi_name);
} break;
}
}
+
+ /* set exec if present on command line */
+ if ((argc > php_optind) && (strcmp(argv[php_optind-1],"--") != SUCCESS))
+ {
+ exec_len = strlen(argv[php_optind]);
+ if (exec_len) {
+ if (exec) {
+ free(exec);
+ }
+ exec = strdup(argv[php_optind]);
+ }
+ php_optind++;
+ }
#ifndef _WIN32
/* setup remote server if necessary */
" **-d** **-d**memory_limit=4G Set a php.ini directive" CR
" **-n** Disable default php.ini" CR
" **-q** Supress welcome banner" CR
-" **-e** **-e**mytest.php Set execution context" CR
" **-v** Enable oplog output" CR
" **-s** Enable stepping" CR
" **-b** Disable colour" CR