summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache2handler/apache_config.c11
-rw-r--r--sapi/apache2handler/config.m413
-rw-r--r--sapi/apache2handler/mod_php7.c11
-rw-r--r--sapi/apache2handler/php_apache.h2
-rw-r--r--sapi/apache2handler/php_functions.c11
-rw-r--r--sapi/apache2handler/sapi_apache2.c22
-rw-r--r--sapi/cgi/cgi_main.c42
-rw-r--r--sapi/cgi/config9.m47
-rw-r--r--sapi/cgi/tests/001.phpt4
-rw-r--r--sapi/cgi/tests/002.phpt2
-rw-r--r--sapi/cgi/tests/003.phpt2
-rw-r--r--sapi/cgi/tests/004.phpt6
-rw-r--r--sapi/cgi/tests/006.phpt2
-rw-r--r--sapi/cgi/tests/008.phpt2
-rw-r--r--sapi/cgi/tests/apache_request_headers.phpt2
-rw-r--r--sapi/cgi/tests/apache_response_headers.phpt4
-rw-r--r--sapi/cgi/tests/bug69487.phpt (renamed from sapi/tests/bug69487.phpt)0
-rw-r--r--sapi/cgi/tests/bug75574_utf8.phpt (renamed from sapi/cgi/tests/bug75574_utf8_win.phpt)6
-rw-r--r--sapi/cli/cli.h11
-rw-r--r--sapi/cli/config.m48
-rwxr-xr-x[-rw-r--r--]sapi/cli/generate_mime_type_map.php11
-rw-r--r--sapi/cli/mime_type_map.h11
-rw-r--r--sapi/cli/php.1.in4
-rw-r--r--sapi/cli/php_cli.c31
-rw-r--r--sapi/cli/php_cli_process_title.c11
-rw-r--r--sapi/cli/php_cli_process_title.h11
-rw-r--r--sapi/cli/php_cli_server.c18
-rw-r--r--sapi/cli/php_cli_server.h11
-rw-r--r--sapi/cli/ps_title.h2
-rw-r--r--sapi/cli/tests/001.phpt4
-rw-r--r--sapi/cli/tests/002-unix.phpt (renamed from sapi/cli/tests/002-win32.phpt)6
-rw-r--r--sapi/cli/tests/002.phpt5
-rw-r--r--sapi/cli/tests/007.phpt2
-rw-r--r--sapi/cli/tests/008.phpt6
-rw-r--r--sapi/cli/tests/010-2.phpt2
-rw-r--r--sapi/cli/tests/011.phpt2
-rw-r--r--sapi/cli/tests/013.phpt2
-rw-r--r--sapi/cli/tests/014.phpt2
-rw-r--r--sapi/cli/tests/022.phpt2
-rw-r--r--sapi/cli/tests/CONFLICTS1
-rw-r--r--sapi/cli/tests/argv_mb.phpt5
-rw-r--r--sapi/cli/tests/argv_mb_bug77111.phpt8
-rw-r--r--sapi/cli/tests/bug71624.phpt2
-rw-r--r--sapi/cli/tests/php_cli_server_015.phpt2
-rw-r--r--sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt75
-rw-r--r--sapi/embed/config.m49
-rw-r--r--sapi/embed/php_embed.c16
-rw-r--r--sapi/embed/php_embed.h2
-rw-r--r--sapi/fpm/config.m449
-rw-r--r--sapi/fpm/fpm/events/devpoll.c8
-rw-r--r--sapi/fpm/fpm/events/devpoll.h2
-rw-r--r--sapi/fpm/fpm/events/epoll.c2
-rw-r--r--sapi/fpm/fpm/events/epoll.h2
-rw-r--r--sapi/fpm/fpm/events/kqueue.c2
-rw-r--r--sapi/fpm/fpm/events/kqueue.h2
-rw-r--r--sapi/fpm/fpm/events/poll.c2
-rw-r--r--sapi/fpm/fpm/events/poll.h2
-rw-r--r--sapi/fpm/fpm/events/port.c2
-rw-r--r--sapi/fpm/fpm/events/port.h2
-rw-r--r--sapi/fpm/fpm/events/select.c2
-rw-r--r--sapi/fpm/fpm/events/select.h2
-rw-r--r--sapi/fpm/fpm/fpm_children.c4
-rw-r--r--sapi/fpm/fpm/fpm_main.c39
-rw-r--r--sapi/fpm/fpm/fpm_request.c2
-rw-r--r--sapi/fpm/php-fpm.8.in4
-rw-r--r--sapi/fpm/php-fpm.service.in54
-rw-r--r--sapi/fpm/tests/fcgi.inc2
-rw-r--r--sapi/fpm/tests/main-version.phpt4
-rw-r--r--sapi/litespeed/config.m46
-rw-r--r--sapi/litespeed/lsapi_main.c25
-rw-r--r--sapi/litespeed/lsapidef.h2
-rw-r--r--sapi/litespeed/lsapilib.c6
-rw-r--r--sapi/litespeed/lsapilib.h2
-rw-r--r--sapi/litespeed/lscriu.c11
-rw-r--r--sapi/litespeed/lscriu.h2
-rw-r--r--sapi/phpdbg/Changelog.md52
-rw-r--r--sapi/phpdbg/config.m432
-rwxr-xr-x[-rw-r--r--]sapi/phpdbg/create-test.php2
-rw-r--r--sapi/phpdbg/phpdbg.1.in4
-rw-r--r--sapi/phpdbg/phpdbg.c18
-rw-r--r--sapi/phpdbg/phpdbg.h6
-rw-r--r--sapi/phpdbg/phpdbg_bp.c2
-rw-r--r--sapi/phpdbg/phpdbg_bp.h2
-rw-r--r--sapi/phpdbg/phpdbg_break.c2
-rw-r--r--sapi/phpdbg/phpdbg_break.h2
-rw-r--r--sapi/phpdbg/phpdbg_btree.c2
-rw-r--r--sapi/phpdbg/phpdbg_btree.h2
-rw-r--r--sapi/phpdbg/phpdbg_cmd.c6
-rw-r--r--sapi/phpdbg/phpdbg_cmd.h2
-rw-r--r--sapi/phpdbg/phpdbg_eol.c2
-rw-r--r--sapi/phpdbg/phpdbg_eol.h2
-rw-r--r--sapi/phpdbg/phpdbg_frame.c2
-rw-r--r--sapi/phpdbg/phpdbg_frame.h2
-rw-r--r--sapi/phpdbg/phpdbg_help.c4
-rw-r--r--sapi/phpdbg/phpdbg_help.h2
-rw-r--r--sapi/phpdbg/phpdbg_info.c2
-rw-r--r--sapi/phpdbg/phpdbg_info.h2
-rw-r--r--sapi/phpdbg/phpdbg_io.c2
-rw-r--r--sapi/phpdbg/phpdbg_io.h2
-rw-r--r--sapi/phpdbg/phpdbg_lexer.c2085
-rw-r--r--sapi/phpdbg/phpdbg_lexer.h2
-rw-r--r--sapi/phpdbg/phpdbg_list.c2
-rw-r--r--sapi/phpdbg/phpdbg_list.h2
-rw-r--r--sapi/phpdbg/phpdbg_opcode.c2
-rw-r--r--sapi/phpdbg/phpdbg_opcode.h2
-rw-r--r--sapi/phpdbg/phpdbg_out.c2
-rw-r--r--sapi/phpdbg/phpdbg_out.h2
-rw-r--r--sapi/phpdbg/phpdbg_parser.c1953
-rw-r--r--sapi/phpdbg/phpdbg_parser.h130
-rw-r--r--sapi/phpdbg/phpdbg_parser.y9
-rw-r--r--sapi/phpdbg/phpdbg_print.c2
-rw-r--r--sapi/phpdbg/phpdbg_print.h2
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c6
-rw-r--r--sapi/phpdbg/phpdbg_prompt.h2
-rw-r--r--sapi/phpdbg/phpdbg_rinit_hook.c2
-rw-r--r--sapi/phpdbg/phpdbg_rinit_hook.h4
-rw-r--r--sapi/phpdbg/phpdbg_set.c2
-rw-r--r--sapi/phpdbg/phpdbg_set.h2
-rw-r--r--sapi/phpdbg/phpdbg_sigio_win32.c2
-rw-r--r--sapi/phpdbg/phpdbg_sigio_win32.h2
-rw-r--r--sapi/phpdbg/phpdbg_utils.c14
-rw-r--r--sapi/phpdbg/phpdbg_utils.h4
-rw-r--r--sapi/phpdbg/phpdbg_wait.c2
-rw-r--r--sapi/phpdbg/phpdbg_wait.h2
-rw-r--r--sapi/phpdbg/phpdbg_watch.c4
-rw-r--r--sapi/phpdbg/phpdbg_watch.h2
-rw-r--r--sapi/phpdbg/phpdbg_webdata_transfer.c2
-rw-r--r--sapi/phpdbg/phpdbg_webdata_transfer.h2
-rw-r--r--sapi/phpdbg/phpdbg_win.c2
-rw-r--r--sapi/phpdbg/phpdbg_win.h2
-rw-r--r--sapi/phpdbg/tests/print_001.phpt24
-rw-r--r--sapi/phpdbg/tests/stepping_001.phpt4
-rw-r--r--sapi/phpdbg/web-bootstrap.php2
-rw-r--r--sapi/phpdbg/xml.md2
-rw-r--r--sapi/tests/test001.phpt16
-rw-r--r--sapi/tests/test002.phpt22
-rw-r--r--sapi/tests/test003.phpt21
-rw-r--r--sapi/tests/test004.phpt26
-rw-r--r--sapi/tests/test005.phpt27
-rw-r--r--sapi/tests/test006.phpt72
-rw-r--r--sapi/tests/test007.phpt45
141 files changed, 437 insertions, 4906 deletions
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index 4c9c80f942..d0913c250e 100644
--- a/sapi/apache2handler/apache_config.c
+++ b/sapi/apache2handler/apache_config.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -233,12 +233,3 @@ void *create_php_config(apr_pool_t *p, char *dummy)
apr_pool_cleanup_register(p, newx, destroy_php_config, apr_pool_cleanup_null);
return (void *) newx;
}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/apache2handler/config.m4 b/sapi/apache2handler/config.m4
index 44dee3fad5..d1d92db21f 100644
--- a/sapi/apache2handler/config.m4
+++ b/sapi/apache2handler/config.m4
@@ -1,8 +1,11 @@
dnl config.m4 for sapi apache2handler
-PHP_ARG_WITH(apxs2,,
-[ --with-apxs2[=FILE] Build shared Apache 2.0 Handler module. FILE is the optional
- pathname to the Apache apxs tool [apxs]], no, no)
+PHP_ARG_WITH([apxs2],,
+ [AS_HELP_STRING([[--with-apxs2[=FILE]]],
+ [Build shared Apache 2.0 Handler module. FILE is the optional pathname to
+ the Apache apxs tool [apxs]])],
+ [no],
+ [no])
AC_MSG_CHECKING([for Apache 2.0 handler-module support via DSO through APXS])
@@ -123,7 +126,3 @@ if test "$PHP_APXS2" != "no"; then
else
AC_MSG_RESULT(no)
fi
-
-dnl ## Local Variables:
-dnl ## tab-width: 4
-dnl ## End:
diff --git a/sapi/apache2handler/mod_php7.c b/sapi/apache2handler/mod_php7.c
index e2f96592cc..6c44dbaa2c 100644
--- a/sapi/apache2handler/mod_php7.c
+++ b/sapi/apache2handler/mod_php7.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -32,12 +32,3 @@ AP_MODULE_DECLARE_DATA module php7_module = {
php_dir_cmds, /* command apr_table_t */
php_ap2_register_hook /* register hooks */
};
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/apache2handler/php_apache.h b/sapi/apache2handler/php_apache.h
index ae5e5972cc..423ada1f9b 100644
--- a/sapi/apache2handler/php_apache.h
+++ b/sapi/apache2handler/php_apache.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index 6638fddda1..ba2400f6a0 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -562,12 +562,3 @@ zend_module_entry php_apache_module = {
NULL,
STANDARD_MODULE_PROPERTIES
};
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 23eef816a8..193420eca4 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -474,15 +474,18 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
apache2_sapi_module.php_ini_path_override = apache2_php_ini_path_override;
}
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
- (void)ts_resource(0);
+ php_tsrm_startup();
+# ifdef PHP_WIN32
ZEND_TSRMLS_CACHE_UPDATE();
+# endif
#endif
zend_signal_startup();
sapi_startup(&apache2_sapi_module);
- apache2_sapi_module.startup(&apache2_sapi_module);
+ if (apache2_sapi_module.startup(&apache2_sapi_module) != SUCCESS) {
+ return DONE;
+ }
apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null);
php_apache_add_version(pconf);
@@ -572,7 +575,9 @@ static int php_handler(request_rec *r)
#ifdef ZTS
/* initial resource fetch */
(void)ts_resource(0);
+# ifdef PHP_WIN32
ZEND_TSRMLS_CACHE_UPDATE();
+# endif
#endif
#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req);
@@ -751,12 +756,3 @@ void php_ap2_register_hook(apr_pool_t *p)
#endif
ap_hook_child_init(php_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE);
}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index fb16f2b577..b22d37f89b 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -183,7 +183,7 @@ typedef struct _php_cgi_globals_struct {
* Key for each cache entry is dirname(PATH_TRANSLATED).
*
* NOTE: Each cache entry config_hash contains the combination from all user ini files found in
- * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point
+ * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point
* storing per-file entries as it would not be possible to detect added / deleted entries
* between separate files.
*/
@@ -244,13 +244,6 @@ static void fcgi_log(int type, const char *format, ...) {
}
#endif
-static int print_module_info(zval *element)
-{
- zend_module_entry *module = Z_PTR_P(element);
- php_printf("%s\n", module->name);
- return ZEND_HASH_APPLY_KEEP;
-}
-
static int module_name_cmp(const void *a, const void *b)
{
Bucket *f = (Bucket *) a;
@@ -263,11 +256,14 @@ static int module_name_cmp(const void *a, const void *b)
static void print_modules(void)
{
HashTable sorted_registry;
+ zend_module_entry *module;
zend_hash_init(&sorted_registry, 64, NULL, NULL, 1);
zend_hash_copy(&sorted_registry, &module_registry, NULL);
zend_hash_sort(&sorted_registry, module_name_cmp, 0);
- zend_hash_apply(&sorted_registry, print_module_info);
+ ZEND_HASH_FOREACH_PTR(&sorted_registry, module) {
+ php_printf("%s\n", module->name);
+ } ZEND_HASH_FOREACH_END();
zend_hash_destroy(&sorted_registry);
}
@@ -1536,7 +1532,7 @@ PHP_INI_END()
*/
static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals)
{
-#ifdef ZTS
+#if defined(ZTS) && defined(PHP_WIN32)
ZEND_TSRMLS_CACHE_UPDATE();
#endif
php_cgi_globals->rfc2616_headers = 0;
@@ -1795,9 +1791,10 @@ int main(int argc, char *argv[])
#endif
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
- (void)ts_resource(0);
+ php_tsrm_startup();
+# ifdef PHP_WIN32
ZEND_TSRMLS_CACHE_UPDATE();
+# endif
#endif
zend_signal_startup();
@@ -2155,6 +2152,7 @@ consult the installation file that came with this distribution, or visit \n\
char *err_text = php_win32_error_to_msg(err);
fprintf(stderr, "unable to get current command line: [0x%08lx]: %s\n", err, err_text);
+ php_win32_error_msg_free(err_text);
goto parent_out;
}
@@ -2173,6 +2171,8 @@ consult the installation file that came with this distribution, or visit \n\
fprintf(stderr, "unable to create job object: [0x%08lx]: %s\n", err, err_text);
+ php_win32_error_msg_free(err_text);
+
goto parent_out;
}
@@ -2182,6 +2182,7 @@ consult the installation file that came with this distribution, or visit \n\
char *err_text = php_win32_error_to_msg(err);
fprintf(stderr, "unable to configure job object: [0x%08lx]: %s\n", err, err_text);
+ php_win32_error_msg_free(err_text);
}
while (parent) {
@@ -2228,6 +2229,7 @@ consult the installation file that came with this distribution, or visit \n\
char *err_text = php_win32_error_to_msg(err);
fprintf(stderr, "unable to assign child process to job object: [0x%08lx]: %s\n", err, err_text);
+ php_win32_error_msg_free(err_text);
}
CloseHandle(pi.hThread);
} else {
@@ -2237,6 +2239,7 @@ consult the installation file that came with this distribution, or visit \n\
kid_cgi_ps[i] = NULL;
fprintf(stderr, "unable to spawn: [0x%08lx]: %s\n", err, err_text);
+ php_win32_error_msg_free(err_text);
}
}
@@ -2391,9 +2394,9 @@ parent_loop_end:
SG(headers_sent) = 1;
SG(request_info).no_headers = 1;
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
php_request_shutdown((void *) 0);
fcgi_shutdown();
@@ -2779,12 +2782,3 @@ parent_out:
return exit_status;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/cgi/config9.m4 b/sapi/cgi/config9.m4
index bdf9edbdc1..f000b5eb88 100644
--- a/sapi/cgi/config9.m4
+++ b/sapi/cgi/config9.m4
@@ -1,7 +1,10 @@
dnl config.m4 for sapi cgi
-PHP_ARG_ENABLE(cgi,,
-[ --disable-cgi Disable building CGI version of PHP], yes, no)
+PHP_ARG_ENABLE([cgi],,
+ [AS_HELP_STRING([--disable-cgi],
+ [Disable building CGI version of PHP])],
+ [yes],
+ [no])
dnl
dnl CGI setup
diff --git a/sapi/cgi/tests/001.phpt b/sapi/cgi/tests/001.phpt
index 74c694f7c0..948f4ce304 100644
--- a/sapi/cgi/tests/001.phpt
+++ b/sapi/cgi/tests/001.phpt
@@ -16,7 +16,7 @@ echo "Done\n";
?>
--EXPECTF--
string(%d) "PHP %s (cgi%s (built: %s
-Copyright (c) 1997-20%s The PHP Group
-Zend Engine v%s, Copyright (c) 1998-20%s Zend Technologies
+Copyright (c) The PHP Group
+Zend Engine v%s, Copyright (c) Zend Technologies
"
Done
diff --git a/sapi/cgi/tests/002.phpt b/sapi/cgi/tests/002.phpt
index 91db184fcb..b28c865659 100644
--- a/sapi/cgi/tests/002.phpt
+++ b/sapi/cgi/tests/002.phpt
@@ -11,7 +11,7 @@ include "include.inc";
$php = get_cgi_path();
reset_env_vars();
-$file = dirname(__FILE__)."/002.test.php";
+$file = __DIR__."/002.test.php";
file_put_contents($file, '<?php var_dump(ini_get("max_execution_time")); ?>');
diff --git a/sapi/cgi/tests/003.phpt b/sapi/cgi/tests/003.phpt
index a4d3058624..4b4d29267d 100644
--- a/sapi/cgi/tests/003.phpt
+++ b/sapi/cgi/tests/003.phpt
@@ -17,7 +17,7 @@ include "include.inc";
$php = get_cgi_path();
reset_env_vars();
-$filename = dirname(__FILE__).'/003.test.php';
+$filename = __DIR__.'/003.test.php';
$code ='
<?php
/* some test script */
diff --git a/sapi/cgi/tests/004.phpt b/sapi/cgi/tests/004.phpt
index 93c48c9ff4..b46dce7052 100644
--- a/sapi/cgi/tests/004.phpt
+++ b/sapi/cgi/tests/004.phpt
@@ -12,12 +12,12 @@ include "include.inc";
$php = get_cgi_path();
reset_env_vars();
-$filename = dirname(__FILE__).'/004.test.php';
+$filename = __DIR__.'/004.test.php';
$code ='
<?php
-class test {
- private $pri;
+class test {
+ private $pri;
}
var_dump(test::$pri);
diff --git a/sapi/cgi/tests/006.phpt b/sapi/cgi/tests/006.phpt
index bc98656b49..c78229880c 100644
--- a/sapi/cgi/tests/006.phpt
+++ b/sapi/cgi/tests/006.phpt
@@ -11,7 +11,7 @@ include "include.inc";
$php = get_cgi_path();
reset_env_vars();
-$filename = dirname(__FILE__)."/006.test.php";
+$filename = __DIR__."/006.test.php";
$code = '
<?php
diff --git a/sapi/cgi/tests/008.phpt b/sapi/cgi/tests/008.phpt
index f0df0bae42..be2fd578e7 100644
--- a/sapi/cgi/tests/008.phpt
+++ b/sapi/cgi/tests/008.phpt
@@ -10,7 +10,7 @@ include "include.inc";
$php = get_cgi_path();
reset_env_vars();
-$filename = dirname(__FILE__)."/008.test.php";
+$filename = __DIR__."/008.test.php";
$code = '
<?php
$test = "var"; //var
diff --git a/sapi/cgi/tests/apache_request_headers.phpt b/sapi/cgi/tests/apache_request_headers.phpt
index 3750600671..bda9ef8b70 100644
--- a/sapi/cgi/tests/apache_request_headers.phpt
+++ b/sapi/cgi/tests/apache_request_headers.phpt
@@ -13,7 +13,7 @@ include "include.inc";
$php = get_cgi_path();
reset_env_vars();
-$file = dirname(__FILE__)."/012.test.php";
+$file = __DIR__."/012.test.php";
file_put_contents($file, '<?php print_r(apache_request_headers()); ?>');
diff --git a/sapi/cgi/tests/apache_response_headers.phpt b/sapi/cgi/tests/apache_response_headers.phpt
index 2964ac7bc7..99b1352680 100644
--- a/sapi/cgi/tests/apache_response_headers.phpt
+++ b/sapi/cgi/tests/apache_response_headers.phpt
@@ -11,7 +11,7 @@ include "include.inc";
$php = get_cgi_path();
reset_env_vars();
-$test_file = dirname(__FILE__) . DIRECTORY_SEPARATOR ."apache_response_headers.test.php";
+$test_file = __DIR__ . DIRECTORY_SEPARATOR ."apache_response_headers.test.php";
$code = '<?php';
$code .= '
@@ -34,7 +34,7 @@ passthru( "$php -n -q " . escapeshellarg( $test_file ) );
===DONE===
--CLEAN--
<?php
-@unlink( dirname(__FILE__) . DIRECTORY_SEPARATOR ."apache_response_headers.test.php" );
+@unlink( __DIR__ . DIRECTORY_SEPARATOR ."apache_response_headers.test.php" );
?>
--EXPECTF--
array(3) {
diff --git a/sapi/tests/bug69487.phpt b/sapi/cgi/tests/bug69487.phpt
index 3ac3796826..3ac3796826 100644
--- a/sapi/tests/bug69487.phpt
+++ b/sapi/cgi/tests/bug69487.phpt
diff --git a/sapi/cgi/tests/bug75574_utf8_win.phpt b/sapi/cgi/tests/bug75574_utf8.phpt
index c6e33e54ed..d7f0e3e5ee 100644
--- a/sapi/cgi/tests/bug75574_utf8_win.phpt
+++ b/sapi/cgi/tests/bug75574_utf8.phpt
@@ -2,10 +2,6 @@
Bug #75574 putenv does not work properly if parameter contains non-ASCII unicode character, UTF-8
--SKIPIF--
<?php
-
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
include "skipif.inc";
?>
--FILE--
@@ -20,7 +16,7 @@ include "include.inc";
$php = get_cgi_path();
reset_env_vars();
-$fn = dirname(__FILE__) . DIRECTORY_SEPARATOR . md5(uniqid());
+$fn = __DIR__ . DIRECTORY_SEPARATOR . md5(uniqid());
file_put_contents($fn, "<?php\nvar_dump(putenv('FOO=啊'));\n//var_dump(`echo %FOO%`);\nvar_dump(getenv('FOO'));");
echo shell_exec("$php -n -f $fn");
diff --git a/sapi/cli/cli.h b/sapi/cli/cli.h
index 5cc39ff00b..b4c2851791 100644
--- a/sapi/cli/cli.h
+++ b/sapi/cli/cli.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -39,12 +39,3 @@ typedef struct {
extern PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks();
#endif /* CLI_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/sapi/cli/config.m4 b/sapi/cli/config.m4
index 93c9e7b702..0d2558eb83 100644
--- a/sapi/cli/config.m4
+++ b/sapi/cli/config.m4
@@ -1,8 +1,10 @@
dnl config.m4 for sapi cli
-PHP_ARG_ENABLE(cli,,
-[ --disable-cli Disable building CLI version of PHP
- (this forces --without-pear)], yes, no)
+PHP_ARG_ENABLE([cli],,
+ [AS_HELP_STRING([--disable-cli],
+ [Disable building CLI version of PHP (this forces --without-pear)])],
+ [yes],
+ [no])
AC_CHECK_FUNCS(setproctitle)
diff --git a/sapi/cli/generate_mime_type_map.php b/sapi/cli/generate_mime_type_map.php
index 0cea031e37..b0176bb524 100644..100755
--- a/sapi/cli/generate_mime_type_map.php
+++ b/sapi/cli/generate_mime_type_map.php
@@ -45,7 +45,7 @@ foreach($additional_mime_maps as $ext => $mime) {
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -78,12 +78,3 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
};
#endif /* PHP_CLI_SERVER_MIME_TYPE_MAP_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/sapi/cli/mime_type_map.h b/sapi/cli/mime_type_map.h
index 2b880b4c7f..0c559d635f 100644
--- a/sapi/cli/mime_type_map.h
+++ b/sapi/cli/mime_type_map.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -1017,12 +1017,3 @@ static const php_cli_server_ext_mime_type_pair mime_type_map[] = {
};
#endif /* PHP_CLI_SERVER_MIME_TYPE_MAP_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/sapi/cli/php.1.in b/sapi/cli/php.1.in
index 88a43d30cb..400f7b000f 100644
--- a/sapi/cli/php.1.in
+++ b/sapi/cli/php.1.in
@@ -1,4 +1,4 @@
-.TH @program_prefix@php 1 "2018" "The PHP Group" "Scripting Language"
+.TH @program_prefix@php 1 "2019" "The PHP Group" "Scripting Language"
.SH NAME
@program_prefix@php \- PHP Command Line Interface 'CLI'
.P
@@ -454,7 +454,7 @@ contributors all around the world.
.SH VERSION INFORMATION
This manpage describes \fBphp\fP, version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2018 The PHP Group
+Copyright \(co The PHP Group
.LP
This source file is subject to version 3.01 of the PHP license,
that is bundled with this package in the file LICENSE, and is
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 3b053e223a..4333487a0b 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -182,14 +182,6 @@ const opt_struct OPTIONS[] = {
{'-', 0, NULL} /* end of args */
};
-static int print_module_info(zval *element) /* {{{ */
-{
- zend_module_entry *module = (zend_module_entry*)Z_PTR_P(element);
- php_printf("%s\n", module->name);
- return ZEND_HASH_APPLY_KEEP;
-}
-/* }}} */
-
static int module_name_cmp(const void *a, const void *b) /* {{{ */
{
Bucket *f = (Bucket *) a;
@@ -203,11 +195,14 @@ static int module_name_cmp(const void *a, const void *b) /* {{{ */
static void print_modules(void) /* {{{ */
{
HashTable sorted_registry;
+ zend_module_entry *module;
zend_hash_init(&sorted_registry, 50, NULL, NULL, 0);
zend_hash_copy(&sorted_registry, &module_registry, NULL);
zend_hash_sort(&sorted_registry, module_name_cmp, 0);
- zend_hash_apply(&sorted_registry, print_module_info);
+ ZEND_HASH_FOREACH_PTR(&sorted_registry, module) {
+ php_printf("%s\n", module->name);
+ } ZEND_HASH_FOREACH_END();
zend_hash_destroy(&sorted_registry);
}
/* }}} */
@@ -683,7 +678,7 @@ static int do_cli(int argc, char **argv) /* {{{ */
goto out;
case 'v': /* show php version & quit */
- php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) 1997-2018 The PHP Group\n%s",
+ php_printf("PHP %s (%s) (built: %s %s) ( %s)\nCopyright (c) The PHP Group\n%s",
PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
#if ZTS
"ZTS "
@@ -1251,9 +1246,10 @@ int main(int argc, char *argv[])
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
- (void)ts_resource(0);
+ php_tsrm_startup();
+# ifdef PHP_WIN32
ZEND_TSRMLS_CACHE_UPDATE();
+# endif
#endif
zend_signal_startup();
@@ -1427,12 +1423,3 @@ out:
exit(exit_status);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/cli/php_cli_process_title.c b/sapi/cli/php_cli_process_title.c
index a85370cbd5..1b82104ca6 100644
--- a/sapi/cli/php_cli_process_title.c
+++ b/sapi/cli/php_cli_process_title.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -67,12 +67,3 @@ PHP_FUNCTION(cli_get_process_title)
RETURN_STRINGL(title, length);
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/sapi/cli/php_cli_process_title.h b/sapi/cli/php_cli_process_title.h
index 8882e3cd0e..c2fed7b817 100644
--- a/sapi/cli/php_cli_process_title.h
+++ b/sapi/cli/php_cli_process_title.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -30,12 +30,3 @@ PHP_FUNCTION(cli_set_process_title);
PHP_FUNCTION(cli_get_process_title);
#endif
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 38cc094954..deb61816a7 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -37,10 +37,6 @@
#include <unixlib/local.h>
#endif
-
-#if HAVE_TIME_H
-#include <time.h>
-#endif
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -1299,9 +1295,6 @@ out:
static int php_cli_server_request_ctor(php_cli_server_request *req) /* {{{ */
{
-#ifdef ZTS
-ZEND_TSRMLS_CACHE_UPDATE();
-#endif
req->protocol_version = 0;
req->request_uri = NULL;
req->request_uri_len = 0;
@@ -2616,12 +2609,3 @@ int do_cli_server(int argc, char **argv) /* {{{ */
php_cli_server_dtor(&server);
return 0;
} /* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/sapi/cli/php_cli_server.h b/sapi/cli/php_cli_server.h
index 2a68894479..4d57f1b922 100644
--- a/sapi/cli/php_cli_server.h
+++ b/sapi/cli/php_cli_server.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -37,12 +37,3 @@ ZEND_TSRMLS_CACHE_EXTERN()
#endif
#endif /* PHP_CLI_SERVER_H */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
diff --git a/sapi/cli/ps_title.h b/sapi/cli/ps_title.h
index bc18470ce1..540609c85d 100644
--- a/sapi/cli/ps_title.h
+++ b/sapi/cli/ps_title.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/cli/tests/001.phpt b/sapi/cli/tests/001.phpt
index 744918a373..ede63ffb03 100644
--- a/sapi/cli/tests/001.phpt
+++ b/sapi/cli/tests/001.phpt
@@ -13,7 +13,7 @@ echo "Done\n";
?>
--EXPECTF--
string(%d) "PHP %s (cli) (built: %s)%s
-Copyright (c) 1997-20%d The PHP Group
-Zend Engine v%s, Copyright (c) 1998-20%d Zend Technologies
+Copyright (c) The PHP Group
+Zend Engine v%s, Copyright (c) Zend Technologies
"
Done
diff --git a/sapi/cli/tests/002-win32.phpt b/sapi/cli/tests/002-unix.phpt
index 2895d15211..2be668f188 100644
--- a/sapi/cli/tests/002-win32.phpt
+++ b/sapi/cli/tests/002-unix.phpt
@@ -3,8 +3,8 @@ running code with -r
--SKIPIF--
<?php
include "skipif.inc";
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die ("skip only for Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die ("skip not for Windows");
}
?>
--FILE--
@@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
$php = getenv('TEST_PHP_EXECUTABLE');
-var_dump(`$php -n -r "var_dump('hello');"`);
+var_dump(`$php -n -r 'var_dump("hello");'`);
echo "Done\n";
?>
diff --git a/sapi/cli/tests/002.phpt b/sapi/cli/tests/002.phpt
index 2be668f188..9fb2465ee4 100644
--- a/sapi/cli/tests/002.phpt
+++ b/sapi/cli/tests/002.phpt
@@ -3,16 +3,13 @@ running code with -r
--SKIPIF--
<?php
include "skipif.inc";
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
-}
?>
--FILE--
<?php
$php = getenv('TEST_PHP_EXECUTABLE');
-var_dump(`$php -n -r 'var_dump("hello");'`);
+var_dump(`$php -n -r "var_dump('hello');"`);
echo "Done\n";
?>
diff --git a/sapi/cli/tests/007.phpt b/sapi/cli/tests/007.phpt
index dd8e17163c..51858bae48 100644
--- a/sapi/cli/tests/007.phpt
+++ b/sapi/cli/tests/007.phpt
@@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
$php = getenv('TEST_PHP_EXECUTABLE');
-$filename = dirname(__FILE__).'/007.test.php';
+$filename = __DIR__.'/007.test.php';
$code ='
<?php
/* some test script */
diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt
index 429254f4d6..fb8518535a 100644
--- a/sapi/cli/tests/008.phpt
+++ b/sapi/cli/tests/008.phpt
@@ -12,12 +12,12 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
$php = getenv('TEST_PHP_EXECUTABLE');
-$filename = dirname(__FILE__).'/008.test.php';
+$filename = __DIR__.'/008.test.php';
$code ='
<?php
-class test {
- private $pri;
+class test {
+ private $pri;
}
var_dump(test::$pri);
diff --git a/sapi/cli/tests/010-2.phpt b/sapi/cli/tests/010-2.phpt
index 73198ad28b..af998351bb 100644
--- a/sapi/cli/tests/010-2.phpt
+++ b/sapi/cli/tests/010-2.phpt
@@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
$php = getenv('TEST_PHP_EXECUTABLE');
-$filename_txt = dirname(__FILE__)."/010.test.txt";
+$filename_txt = __DIR__."/010.test.txt";
$txt = '
test
diff --git a/sapi/cli/tests/011.phpt b/sapi/cli/tests/011.phpt
index 1fbe93d703..3ada7c53bf 100644
--- a/sapi/cli/tests/011.phpt
+++ b/sapi/cli/tests/011.phpt
@@ -7,7 +7,7 @@ syntax check
$php = getenv('TEST_PHP_EXECUTABLE');
-$filename = dirname(__FILE__)."/011.test.php";
+$filename = __DIR__."/011.test.php";
$code = '
<?php
diff --git a/sapi/cli/tests/013.phpt b/sapi/cli/tests/013.phpt
index 9e17c009c2..3ca2ba833c 100644
--- a/sapi/cli/tests/013.phpt
+++ b/sapi/cli/tests/013.phpt
@@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
$php = getenv('TEST_PHP_EXECUTABLE');
-$filename_txt = dirname(__FILE__)."/013.test.txt";
+$filename_txt = __DIR__."/013.test.txt";
file_put_contents($filename_txt, "test\nfile\ncontents\n");
var_dump(`cat "$filename_txt" | "$php" -n -B 'var_dump("start");'`);
diff --git a/sapi/cli/tests/014.phpt b/sapi/cli/tests/014.phpt
index 1794d78b54..1ee72e05f6 100644
--- a/sapi/cli/tests/014.phpt
+++ b/sapi/cli/tests/014.phpt
@@ -7,7 +7,7 @@ syntax highlighting
$php = getenv('TEST_PHP_EXECUTABLE');
-$filename = dirname(__FILE__)."/014.test.php";
+$filename = __DIR__."/014.test.php";
$code = '
<?php
$test = "var"; //var
diff --git a/sapi/cli/tests/022.phpt b/sapi/cli/tests/022.phpt
index 0110220bee..3b97016b58 100644
--- a/sapi/cli/tests/022.phpt
+++ b/sapi/cli/tests/022.phpt
@@ -9,7 +9,7 @@ if (substr(PHP_OS, 0, 3) == "WIN") die("skip non windows test");
<?php
$php = getenv("TEST_PHP_EXECUTABLE");
$socket_file = tempnam(sys_get_temp_dir(), pathinfo(__FILE__, PATHINFO_FILENAME) . '.sock');
-$test_file = dirname(__FILE__) . '/' . pathinfo(__FILE__, PATHINFO_FILENAME) . '.inc';
+$test_file = __DIR__ . '/' . pathinfo(__FILE__, PATHINFO_FILENAME) . '.inc';
if (file_exists($socket_file)) {
unlink($socket_file);
}
diff --git a/sapi/cli/tests/CONFLICTS b/sapi/cli/tests/CONFLICTS
new file mode 100644
index 0000000000..254defddb5
--- /dev/null
+++ b/sapi/cli/tests/CONFLICTS
@@ -0,0 +1 @@
+server
diff --git a/sapi/cli/tests/argv_mb.phpt b/sapi/cli/tests/argv_mb.phpt
index 2e14b1a192..868b1a857f 100644
--- a/sapi/cli/tests/argv_mb.phpt
+++ b/sapi/cli/tests/argv_mb.phpt
@@ -3,16 +3,13 @@ Test basic argv multibyte API integration
--SKIPIF--
<?php
include "skipif.inc";
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die ("skip only for Windows");
-}
?>
--FILE--
<?php
$php = getenv('TEST_PHP_EXECUTABLE');
-$argv_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "argv_test.php";
+$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php";
file_put_contents($argv_fl, "<?php var_dump(\$argv); ?>");
var_dump(`$php -n $argv_fl 多字节字符串 マルチバイト文字列 многобайтоваястрока flerbytesträng`);
diff --git a/sapi/cli/tests/argv_mb_bug77111.phpt b/sapi/cli/tests/argv_mb_bug77111.phpt
index e21cc07678..45913b841f 100644
--- a/sapi/cli/tests/argv_mb_bug77111.phpt
+++ b/sapi/cli/tests/argv_mb_bug77111.phpt
@@ -19,9 +19,9 @@ if (!file_exists($php)) {
$php = dirname(getenv('TEST_PHP_EXECUTABLE')) . DIRECTORY_SEPARATOR . "php-win.exe";
-$out_fl = dirname(__FILE__) . "\\argv_bug77111.txt";
+$out_fl = __DIR__ . "\\argv_bug77111.txt";
-$argv_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "argv_test.php";
+$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php";
file_put_contents($argv_fl, "<?php file_put_contents('$out_fl', implode(' ', array_slice(\$argv, 1))); ?>");
`$php -n $argv_fl Ästhetik Æstetik Esthétique Estética Эстетика`;
@@ -31,8 +31,8 @@ var_dump(file_get_contents($out_fl));
==DONE==
--CLEAN--
<?php
-$out_fl = dirname(__FILE__) . "\\argv_bug77111.txt";
-$argv_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "argv_test.php";
+$out_fl = __DIR__ . "\\argv_bug77111.txt";
+$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php";
unlink($argv_fl);
unlink($out_fl);
?>
diff --git a/sapi/cli/tests/bug71624.phpt b/sapi/cli/tests/bug71624.phpt
index aa4c69da12..67e3e8f343 100644
--- a/sapi/cli/tests/bug71624.phpt
+++ b/sapi/cli/tests/bug71624.phpt
@@ -9,7 +9,7 @@ include "skipif.inc";
$php = getenv('TEST_PHP_EXECUTABLE');
-$filename_txt = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug71624.test.txt";
+$filename_txt = __DIR__ . DIRECTORY_SEPARATOR . "bug71624.test.txt";
$txt = 'foo
test
diff --git a/sapi/cli/tests/php_cli_server_015.phpt b/sapi/cli/tests/php_cli_server_015.phpt
index 42000adbb9..990a3db97e 100644
--- a/sapi/cli/tests/php_cli_server_015.phpt
+++ b/sapi/cli/tests/php_cli_server_015.phpt
@@ -10,7 +10,7 @@ display_errors=1
<?php
include "php_cli_server.inc";
php_cli_server_start('require("syntax_error.php");');
-$dir = realpath(dirname(__FILE__));
+$dir = realpath(__DIR__);
file_put_contents($dir . "/syntax_error.php", "<?php non_exists_function(); ?>");
diff --git a/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt b/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt
new file mode 100644
index 0000000000..a5cb3ef03e
--- /dev/null
+++ b/sapi/cli/tests/sapi_windows_set_ctrl_handler.phpt
@@ -0,0 +1,75 @@
+--TEST--
+sapi_windows_set_ctrl_handler()
+--SKIPIF--
+<?php
+
+include "skipinf.inc";
+
+if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
+ die("skip this test is for Windows platforms only");
+?>
+--FILE--
+<?php
+
+$is_child = isset($argv[1]);
+
+
+if ($is_child) {
+ function handler($evt)
+ {
+ echo "\nCaught " . get_evt_name($evt), ", wait, wait ...!\n";
+ exit;
+ }
+
+ sapi_windows_set_ctrl_handler('handler');
+
+ while(1) usleep(100);
+} else {
+ $cmd = PHP_BINARY . " -n " . $argv[0] . " 1";
+ $spec = [0 => ["pipe", "r"], 1 => ["pipe", "w"]];
+
+ $proc = proc_open($cmd, $spec, $pipes, NULL, NULL, ["bypass_shell" => true, "create_process_group" => true]);
+
+ if (!is_resource($proc)) {
+ die("Failed to start child. ");
+ }
+
+ $child_pid = proc_get_status($proc)["pid"];
+ echo "Started child $child_pid\n";
+ usleep(300);
+
+ $cmd = "tasklist /FI \"PID eq $child_pid\" /NH";
+ echo "Running `$cmd` to check the process indeed exists:\n";
+ echo trim(shell_exec($cmd)) . "\n";
+
+ $evt = PHP_WINDOWS_EVENT_CTRL_C;
+ echo "Sending ", get_evt_name($evt), " to child $child_pid\n";
+ $ret = sapi_windows_generate_ctrl_event($evt, $child_pid);
+
+ echo "Child said: \"", trim(fread($pipes[1], 48)), "\"\n";
+
+ echo ($ret ? "Successfully" : "Unsuccessfuly"), " sent ", get_evt_name($evt), " to child $child_pid\n";
+
+ proc_close($proc);
+}
+
+function get_evt_name(int $evt) : ?string
+{
+ if (PHP_WINDOWS_EVENT_CTRL_C == $evt) {
+ return "CTRL+C";
+ } if (PHP_WINDOWS_EVENT_CTRL_BREAK == $evt) {
+ return "CTRL+BREAK";
+ }
+
+ return NULL;
+}
+
+?>
+--EXPECTF--
+Started child %d
+Running `tasklist /FI "PID eq %d" /NH` to check the process indeed exists:
+php.exe%w%d%s1%s
+Sending CTRL+C to child %d
+Child said: "Caught CTRL+C, wait, wait ...!"
+Successfully sent CTRL+C to child %d
+
diff --git a/sapi/embed/config.m4 b/sapi/embed/config.m4
index 78e2d15775..8fa55880fe 100644
--- a/sapi/embed/config.m4
+++ b/sapi/embed/config.m4
@@ -1,8 +1,11 @@
dnl config.m4 for sapi embed
-PHP_ARG_ENABLE(embed,,
-[ --enable-embed[=TYPE] EXPERIMENTAL: Enable building of embedded SAPI library
- TYPE is either 'shared' or 'static'. [TYPE=shared]], no, no)
+PHP_ARG_ENABLE([embed],,
+ [AS_HELP_STRING([[--enable-embed[=TYPE]]],
+ [EXPERIMENTAL: Enable building of embedded SAPI library TYPE is either
+ 'shared' or 'static'. [TYPE=shared]])],
+ [no],
+ [no])
AC_MSG_CHECKING([for embedded SAPI library support])
diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c
index 6b21825ba0..4fcb181cc0 100644
--- a/sapi/embed/php_embed.c
+++ b/sapi/embed/php_embed.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -171,9 +171,10 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv)
#endif
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
- (void)ts_resource(0);
+ php_tsrm_startup();
+# ifdef PHP_WIN32
ZEND_TSRMLS_CACHE_UPDATE();
+# endif
#endif
zend_signal_startup();
@@ -233,12 +234,3 @@ EMBED_SAPI_API void php_embed_shutdown(void)
php_embed_module.ini_entries = NULL;
}
}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/embed/php_embed.h b/sapi/embed/php_embed.h
index 15c311e2b3..855872fed8 100644
--- a/sapi/embed/php_embed.h
+++ b/sapi/embed/php_embed.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index 44d842b285..2aed96046c 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -1,17 +1,20 @@
dnl config.m4 for sapi fpm
-PHP_ARG_ENABLE(fpm,,
-[ --enable-fpm Enable building of the fpm SAPI executable], no, no)
+PHP_ARG_ENABLE([fpm],,
+ [AS_HELP_STRING([--enable-fpm],
+ [Enable building of the fpm SAPI executable])],
+ [no],
+ [no])
dnl configure checks {{{
AC_DEFUN([AC_FPM_STDLIBS],
[
- AC_CHECK_FUNCS(setenv clearenv setproctitle setproctitle_fast)
+ AC_CHECK_FUNCS(clearenv setproctitle setproctitle_fast)
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(inet_addr, nsl)
- AC_CHECK_HEADERS([errno.h fcntl.h stdio.h stdlib.h unistd.h sys/uio.h])
+ AC_CHECK_HEADERS([fcntl.h unistd.h sys/uio.h])
AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/time.h])
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h])
AC_CHECK_HEADERS([sysexits.h])
@@ -562,18 +565,30 @@ if test "$PHP_FPM" != "no"; then
AC_FPM_SELECT
AC_FPM_APPARMOR
- PHP_ARG_WITH(fpm-user,,
- [ --with-fpm-user[=USER] Set the user for php-fpm to run as. (default: nobody)], nobody, no)
-
- PHP_ARG_WITH(fpm-group,,
- [ --with-fpm-group[=GRP] Set the group for php-fpm to run as. For a system user, this
- should usually be set to match the fpm username (default: nobody)], nobody, no)
-
- PHP_ARG_WITH(fpm-systemd,,
- [ --with-fpm-systemd Activate systemd integration], no, no)
-
- PHP_ARG_WITH(fpm-acl,,
- [ --with-fpm-acl Use POSIX Access Control Lists], no, no)
+ PHP_ARG_WITH([fpm-user],,
+ [AS_HELP_STRING([[--with-fpm-user[=USER]]],
+ [Set the user for php-fpm to run as. (default: nobody)])],
+ [nobody],
+ [no])
+
+ PHP_ARG_WITH([fpm-group],,
+ [AS_HELP_STRING([[--with-fpm-group[=GRP]]],
+ [Set the group for php-fpm to run as. For a system user, this should
+ usually be set to match the fpm username (default: nobody)])],
+ [nobody],
+ [no])
+
+ PHP_ARG_WITH([fpm-systemd],,
+ [AS_HELP_STRING([--with-fpm-systemd],
+ [Activate systemd integration])],
+ [no],
+ [no])
+
+ PHP_ARG_WITH([fpm-acl],,
+ [AS_HELP_STRING([--with-fpm-acl],
+ [Use POSIX Access Control Lists])],
+ [no],
+ [no])
if test "$PHP_FPM_SYSTEMD" != "no" ; then
if test -z "$PKG_CONFIG"; then
@@ -670,7 +685,7 @@ if test "$PHP_FPM" != "no"; then
PHP_FPM_TRACE_FILES="fpm/fpm_trace.c fpm/fpm_trace_$fpm_trace_type.c"
fi
- PHP_FPM_CFLAGS="-I$abs_srcdir/sapi/fpm"
+ PHP_FPM_CFLAGS="-I$abs_srcdir/sapi/fpm -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_FPM_FILES="fpm/fpm.c \
fpm/fpm_children.c \
diff --git a/sapi/fpm/fpm/events/devpoll.c b/sapi/fpm/fpm/events/devpoll.c
index e3f73bf126..68cc8dd615 100644
--- a/sapi/fpm/fpm/events/devpoll.c
+++ b/sapi/fpm/fpm/events/devpoll.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -166,7 +166,7 @@ static int fpm_event_devpoll_wait(struct fpm_event_queue_s *queue, unsigned long
}
}
- /* iterate throught triggered events */
+ /* iterate through triggered events */
for (i = 0; i < ret; i++) {
/* find the corresponding event */
@@ -200,7 +200,7 @@ static int fpm_event_devpoll_add(struct fpm_event_s *ev) /* {{{ */
{
struct pollfd pollfd;
- /* fill pollfd with event informations */
+ /* fill pollfd with event information */
pollfd.fd = ev->fd;
pollfd.events = POLLIN;
pollfd.revents = 0;
@@ -225,7 +225,7 @@ static int fpm_event_devpoll_remove(struct fpm_event_s *ev) /* {{{ */
{
struct pollfd pollfd;
- /* fill pollfd with the same informations as fpm_event_devpoll_add */
+ /* fill pollfd with the same information as fpm_event_devpoll_add */
pollfd.fd = ev->fd;
pollfd.events = POLLIN | POLLREMOVE;
pollfd.revents = 0;
diff --git a/sapi/fpm/fpm/events/devpoll.h b/sapi/fpm/fpm/events/devpoll.h
index 08730744ab..d8ff66bf95 100644
--- a/sapi/fpm/fpm/events/devpoll.h
+++ b/sapi/fpm/fpm/events/devpoll.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/epoll.c b/sapi/fpm/fpm/events/epoll.c
index e4a3300e4d..4701339e78 100644
--- a/sapi/fpm/fpm/events/epoll.c
+++ b/sapi/fpm/fpm/events/epoll.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/epoll.h b/sapi/fpm/fpm/events/epoll.h
index 4896178a58..783a2d25af 100644
--- a/sapi/fpm/fpm/events/epoll.h
+++ b/sapi/fpm/fpm/events/epoll.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/kqueue.c b/sapi/fpm/fpm/events/kqueue.c
index f0bb98ec21..c5d1b4f003 100644
--- a/sapi/fpm/fpm/events/kqueue.c
+++ b/sapi/fpm/fpm/events/kqueue.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/kqueue.h b/sapi/fpm/fpm/events/kqueue.h
index abb329e980..a09651b3b3 100644
--- a/sapi/fpm/fpm/events/kqueue.h
+++ b/sapi/fpm/fpm/events/kqueue.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/poll.c b/sapi/fpm/fpm/events/poll.c
index 28bcf0c403..ced32d0215 100644
--- a/sapi/fpm/fpm/events/poll.c
+++ b/sapi/fpm/fpm/events/poll.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/poll.h b/sapi/fpm/fpm/events/poll.h
index c8cac2b367..1a89f31102 100644
--- a/sapi/fpm/fpm/events/poll.h
+++ b/sapi/fpm/fpm/events/poll.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/port.c b/sapi/fpm/fpm/events/port.c
index bb9441369c..1ffcd20a0d 100644
--- a/sapi/fpm/fpm/events/port.c
+++ b/sapi/fpm/fpm/events/port.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/port.h b/sapi/fpm/fpm/events/port.h
index 28aee47f02..7329b2dff5 100644
--- a/sapi/fpm/fpm/events/port.h
+++ b/sapi/fpm/fpm/events/port.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/select.c b/sapi/fpm/fpm/events/select.c
index c0fd8bc085..d69ac7f5dd 100644
--- a/sapi/fpm/fpm/events/select.c
+++ b/sapi/fpm/fpm/events/select.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/events/select.h b/sapi/fpm/fpm/events/select.h
index 6490fe2c18..3b8445537f 100644
--- a/sapi/fpm/fpm/events/select.h
+++ b/sapi/fpm/fpm/events/select.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c
index 82c749fc81..fc05cab82b 100644
--- a/sapi/fpm/fpm/fpm_children.c
+++ b/sapi/fpm/fpm/fpm_children.c
@@ -195,7 +195,7 @@ void fpm_children_bury() /* {{{ */
snprintf(buf, sizeof(buf), "with code %d", WEXITSTATUS(status));
/* if it's been killed because of dynamic process management
- * don't restart it automaticaly
+ * don't restart it automatically
*/
if (child && child->idle_kill) {
restart_child = 0;
@@ -220,7 +220,7 @@ void fpm_children_bury() /* {{{ */
snprintf(buf, sizeof(buf), "on signal %d (%s%s)", WTERMSIG(status), signame, have_core);
/* if it's been killed because of dynamic process management
- * don't restart it automaticaly
+ * don't restart it automatically
*/
if (child && child->idle_kill && WTERMSIG(status) == SIGQUIT) {
restart_child = 0;
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 483fabe9d8..307c02ed7c 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -162,7 +162,7 @@ typedef struct _php_cgi_globals_struct {
* Key for each cache entry is dirname(PATH_TRANSLATED).
*
* NOTE: Each cache entry config_hash contains the combination from all user ini files found in
- * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point
+ * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point
* storing per-file entries as it would not be possible to detect added / deleted entries
* between separate files.
*/
@@ -182,20 +182,12 @@ static void user_config_cache_entry_dtor(zval *el)
#ifdef ZTS
static int php_cgi_globals_id;
-#define CGIG(v) TSRMG(php_cgi_globals_id, php_cgi_globals_struct *, v)
+#define CGIG(v) ZEND_TSRMG(php_cgi_globals_id, php_cgi_globals_struct *, v)
#else
static php_cgi_globals_struct php_cgi_globals;
#define CGIG(v) (php_cgi_globals.v)
#endif
-static int print_module_info(zval *zv) /* {{{ */
-{
- zend_module_entry *module = Z_PTR_P(zv);
- php_printf("%s\n", module->name);
- return 0;
-}
-/* }}} */
-
static int module_name_cmp(const void *a, const void *b) /* {{{ */
{
Bucket *f = (Bucket *) a;
@@ -209,11 +201,14 @@ static int module_name_cmp(const void *a, const void *b) /* {{{ */
static void print_modules(void) /* {{{ */
{
HashTable sorted_registry;
+ zend_module_entry *module;
zend_hash_init(&sorted_registry, 50, NULL, NULL, 1);
zend_hash_copy(&sorted_registry, &module_registry, NULL);
zend_hash_sort(&sorted_registry, module_name_cmp, 0);
- zend_hash_apply(&sorted_registry, print_module_info);
+ ZEND_HASH_FOREACH_PTR(&sorted_registry, module) {
+ php_printf("%s\n", module->name);
+ } ZEND_HASH_FOREACH_END();
zend_hash_destroy(&sorted_registry);
}
/* }}} */
@@ -1555,10 +1550,6 @@ int main(int argc, char *argv[])
int ini_entries_len = 0;
/* end of temporary locals */
-#ifdef ZTS
- void ***tsrm_ls;
-#endif
-
int max_requests = 0;
int requests = 0;
int fcgi_fd = 0;
@@ -1588,8 +1579,7 @@ int main(int argc, char *argv[])
#endif
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
- tsrm_ls = ts_resource(0);
+ php_tsrm_startup();
#endif
zend_signal_startup();
@@ -1728,9 +1718,9 @@ int main(int argc, char *argv[])
SG(request_info).no_headers = 1;
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
php_request_shutdown((void *) 0);
fcgi_shutdown();
@@ -2014,12 +2004,3 @@ out:
return exit_status;
}
/* }}} */
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/fpm/fpm/fpm_request.c b/sapi/fpm/fpm/fpm_request.c
index 65f9c4ae44..372df4a82d 100644
--- a/sapi/fpm/fpm/fpm_request.c
+++ b/sapi/fpm/fpm/fpm_request.c
@@ -25,7 +25,7 @@
static const char *requests_stages[] = {
[FPM_REQUEST_ACCEPTING] = "Idle",
[FPM_REQUEST_READING_HEADERS] = "Reading headers",
- [FPM_REQUEST_INFO] = "Getting request informations",
+ [FPM_REQUEST_INFO] = "Getting request information",
[FPM_REQUEST_EXECUTING] = "Running",
[FPM_REQUEST_END] = "Ending",
[FPM_REQUEST_FINISHED] = "Finishing",
diff --git a/sapi/fpm/php-fpm.8.in b/sapi/fpm/php-fpm.8.in
index 86edaa894f..edff796061 100644
--- a/sapi/fpm/php-fpm.8.in
+++ b/sapi/fpm/php-fpm.8.in
@@ -1,4 +1,4 @@
-.TH PHP-FPM 8 "2018" "The PHP Group" "Scripting Language"
+.TH PHP-FPM 8 "2019" "The PHP Group" "Scripting Language"
.SH NAME
.TP 15
php-fpm \- PHP FastCGI Process Manager 'PHP-FPM'
@@ -213,7 +213,7 @@ contributors all around the world.
.SH VERSION INFORMATION
This manpage describes \fBphp-fpm\fP, version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2018 The PHP Group
+Copyright \(co The PHP Group
.PD 0
.P
Copyright (c) 2007-2009, Andrei Nigmatulin
diff --git a/sapi/fpm/php-fpm.service.in b/sapi/fpm/php-fpm.service.in
index 8a541c0865..857cb0e8f1 100644
--- a/sapi/fpm/php-fpm.service.in
+++ b/sapi/fpm/php-fpm.service.in
@@ -11,7 +11,61 @@ Type=@php_fpm_systemd@
PIDFile=@EXPANDED_LOCALSTATEDIR@/run/php-fpm.pid
ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
+
+# Set up a new file system namespace and mounts private /tmp and /var/tmp directories
+# so this service cannot access the global directories and other processes cannot
+# access this service's directories.
PrivateTmp=true
+# The directories /home, /root and /run/user are made inaccessible and empty for processes
+# invoked by this unit.
+ProtectHome=true
+
+# Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit.
+ProtectSystem=full
+
+# Ensures that the service process and all its children can never gain new privileges
+NoNewPrivileges=true
+
+# Sets up a new /dev namespace for the executed processes and only adds API pseudo devices
+# such as /dev/null, /dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it,
+# but no physical devices such as /dev/sda.
+PrivateDevices=true
+
+# Required for dropping privileges and running as a different user
+CapabilityBoundingSet=CAP_SETGID CAP_SETUID
+
+# Attempts to create memory mappings that are writable and executable at the same time,
+# or to change existing memory mappings to become executable are prohibited.
+MemoryDenyWriteExecute=true
+
+# Explicit module loading will be denied. This allows to turn off module load and unload
+# operations on modular kernels. It is recommended to turn this on for most services that
+# do not need special file systems or extra kernel modules to work.
+ProtectKernelModules=true
+
+# Kernel variables accessible through /proc/sys, /sys, /proc/sysrq-trigger, /proc/latency_stats,
+# /proc/acpi, /proc/timer_stats, /proc/fs and /proc/irq will be made read-only to all processes
+# of the unit. Usually, tunable kernel variables should only be written at boot-time, with the
+# sysctl.d(5) mechanism. Almost no services need to write to these at runtime; it is hence
+# recommended to turn this on for most services.
+ProtectKernelTunables=true
+
+# The Linux Control Groups (cgroups(7)) hierarchies accessible through /sys/fs/cgroup will be
+# made read-only to all processes of the unit. Except for container managers no services should
+# require write access to the control groups hierarchies; it is hence recommended to turn this on
+# for most services
+ProtectControlGroups=true
+
+# Any attempts to enable realtime scheduling in a process of the unit are refused.
+RestrictRealtime=true
+
+# Restricts the set of socket address families accessible to the processes of this unit.
+# Protects against vulnerabilities such as CVE-2016-8655
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+
+# Takes away the ability to create or manage any kind of namespace
+RestrictNamespaces=true
+
[Install]
WantedBy=multi-user.target
diff --git a/sapi/fpm/tests/fcgi.inc b/sapi/fpm/tests/fcgi.inc
index 07603a808e..7e3ad0514b 100644
--- a/sapi/fpm/tests/fcgi.inc
+++ b/sapi/fpm/tests/fcgi.inc
@@ -428,7 +428,7 @@ class Client
}
/**
- * Get Informations on the FastCGI application
+ * Get Information on the FastCGI application
*
* @param array $requestedInfo information to retrieve
* @return array
diff --git a/sapi/fpm/tests/main-version.phpt b/sapi/fpm/tests/main-version.phpt
index 6e42aae48f..40ea45ef01 100644
--- a/sapi/fpm/tests/main-version.phpt
+++ b/sapi/fpm/tests/main-version.phpt
@@ -15,7 +15,7 @@ echo "Done\n";
?>
--EXPECTF--
string(%d) "PHP %s (fpm%s (built: %s
-Copyright (c) 1997-20%s The PHP Group
-Zend Engine v%s, Copyright (c) 1998-20%s Zend Technologies
+Copyright (c) The PHP Group
+Zend Engine v%s, Copyright (c) Zend Technologies
"
Done
diff --git a/sapi/litespeed/config.m4 b/sapi/litespeed/config.m4
index eba8642eb4..3e9175ae2d 100644
--- a/sapi/litespeed/config.m4
+++ b/sapi/litespeed/config.m4
@@ -2,8 +2,10 @@ dnl config.m4 for sapi litespeed
AC_MSG_CHECKING(for LiteSpeed support)
-PHP_ARG_WITH(litespeed,,
-[ --with-litespeed Build PHP as litespeed module], no)
+PHP_ARG_WITH([litespeed],,
+ [AS_HELP_STRING([--with-litespeed],
+ [Build PHP as litespeed module])],
+ [no])
if test "$PHP_LITESPEED" != "no"; then
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/litespeed/Makefile.frag,$abs_srcdir/sapi/litespeed,sapi/litespeed)
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index f572816eef..64e95d5ceb 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -28,10 +28,7 @@
#include "lsapilib.h"
#include <stdio.h>
-
-#if HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -65,7 +62,7 @@
/* Key for each cache entry is dirname(PATH_TRANSLATED).
*
* NOTE: Each cache entry config_hash contains the combination from all user ini files found in
- * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point
+ * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point
* storing per-file entries as it would not be possible to detect added / deleted entries
* between separate files.
*/
@@ -89,7 +86,6 @@ zend_compiler_globals *compiler_globals;
zend_executor_globals *executor_globals;
php_core_globals *core_globals;
sapi_globals_struct *sapi_globals;
-void ***tsrm_ls;
#endif
zend_module_entry litespeed_module_entry;
@@ -1042,9 +1038,9 @@ static int cli_main( int argc, char * argv[] )
case 'v':
if (php_request_startup() != FAILURE) {
#if ZEND_DEBUG
- php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#else
- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2018 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
#endif
#ifdef PHP_OUTPUT_NEWAPI
php_output_end_all();
@@ -1237,7 +1233,7 @@ int main( int argc, char * argv[] )
#endif
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
+ php_tsrm_startup();
#endif
#if PHP_MAJOR_VERSION >= 7
@@ -1265,7 +1261,6 @@ int main( int argc, char * argv[] )
executor_globals = ts_resource(executor_globals_id);
core_globals = ts_resource(core_globals_id);
sapi_globals = ts_resource(sapi_globals_id);
- tsrm_ls = ts_resource(0);
SG(request_info).path_translated = NULL;
#endif
@@ -1514,13 +1509,3 @@ PHP_FUNCTION(apache_get_modules)
}
}
/* }}} */
-
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/sapi/litespeed/lsapidef.h b/sapi/litespeed/lsapidef.h
index f6c0cb0231..5c46bd9cf7 100644
--- a/sapi/litespeed/lsapidef.h
+++ b/sapi/litespeed/lsapidef.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index 0e4410fbc7..c5ae5aff05 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -92,6 +92,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define uint32 uint32_t
#endif
+#include <Zend/zend_portability.h>
+
struct lsapi_MD5Context {
uint32 buf[4];
uint32 bits[2];
@@ -767,7 +769,7 @@ static int (*fp_lve_leave)(struct liblve *, uint32_t *) = NULL;
static int (*fp_lve_jail)( struct passwd *, char *) = NULL;
static int lsapi_load_lve_lib(void)
{
- s_liblve = dlopen("liblve.so.0", RTLD_LAZY);
+ s_liblve = DL_LOAD("liblve.so.0");
if (s_liblve)
{
fp_lve_is_available = dlsym(s_liblve, "lve_is_available");
diff --git a/sapi/litespeed/lsapilib.h b/sapi/litespeed/lsapilib.h
index 8619632e0b..a10fe457b7 100644
--- a/sapi/litespeed/lsapilib.h
+++ b/sapi/litespeed/lsapilib.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/litespeed/lscriu.c b/sapi/litespeed/lscriu.c
index 1318214f58..9fa1de22c5 100644
--- a/sapi/litespeed/lscriu.c
+++ b/sapi/litespeed/lscriu.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -51,10 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "lsapilib.h"
#include <stdio.h>
-
-#if HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#if HAVE_UNISTD_H
#include <unistd.h>
@@ -91,6 +88,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <unistd.h>
#include "lscriu.h"
+#include <Zend/zend_portability.h>
+
#define LSCRIU_PATH 256
// Begin CRIU inclusion
@@ -265,8 +264,8 @@ static int LSCRIU_load_liblscapi(void)
int error = 1;
char *last;
- if (!(lib_handle = dlopen(last = "liblscapi.so", RTLD_LAZY)) /*||
- !(pthread_lib_handle = dlopen(last = "libpthread.so", RTLD_LAZY))*/)
+ if (!(lib_handle = DL_LOAD(last = "liblscapi.so")) /*||
+ !(pthread_lib_handle = DL_LOAD(last = "libpthread.so"))*/)
fprintf(stderr, "LSCRIU (%d): failed to dlopen %s: %s - ignore CRIU\n",
s_pid, last, dlerror());
else if (!(s_lscapi_dump_me = dlsym(lib_handle, last = "lscapi_dump_me")) ||
diff --git a/sapi/litespeed/lscriu.h b/sapi/litespeed/lscriu.h
index 02fc9b880a..e7618114cc 100644
--- a/sapi/litespeed/lscriu.h
+++ b/sapi/litespeed/lscriu.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/Changelog.md b/sapi/phpdbg/Changelog.md
deleted file mode 100644
index c5d8b51514..0000000000
--- a/sapi/phpdbg/Changelog.md
+++ /dev/null
@@ -1,52 +0,0 @@
-ChangeLog for phpdbg
-====================
-
-Version 0.3.0 2013-00-00
-------------------------
-
-1. Added ability to disable an enable a single breakpoint
-2. Added ability to override SAPI name
-3. Added extended conditional breakpoint support "break at"
-4. Fix loading of zend extnsions with -z
-5. Fix crash when loading .phpdbginit with command line switch
-6. Fix crash on startup errors
-7. Added init.d for remote console (redhat)
-8. Added phpdbg_exec userland function
-9. Added testing facilities
-10. Added break on n-th opline support
-11. Improved trace output
-
-Version 0.2.0 2013-11-31
-------------------------
-
-1. Added "break delete <id>" command
-2. Added "break opcode <opcode>" command
-3. Added "set" command - control prompt and console colors
-4. .phpdbginit now searched in (additional) ini dirs
-5. Added source command - load additional .phpdbginit script during session
-6. Added remote console mode
-7. Added info memory command
-
-Version 0.1.0 2013-11-23
-------------------------
-
-1. New commands:
- - until (continue until the current line is executed)
- - frame (switch to a frame in the current stack for inspection)
- - info (quick access to useful information on the console)
- - finish (continue until the current function has returned)
- - leave (continue until the current function is returning)
- - shell (shell a command)
- - register (register a function for use as a command)
-2. Added printers for class and method
-3. Make uniform commands and aliases where possible
-4. Include all alias information and sub-command information in help
-5. Added signal handling to break execution (ctrl-c)
-6. Fixed #13 (Output Buffering Control seems fail)
-7. Fixed #14 (Fixed typo in Makefile.frag)
-
-
-Version 0.0.1 2013-11-15
-------------------------
-
-1. Initial features
diff --git a/sapi/phpdbg/config.m4 b/sapi/phpdbg/config.m4
index 93144acb14..9abc990224 100644
--- a/sapi/phpdbg/config.m4
+++ b/sapi/phpdbg/config.m4
@@ -1,14 +1,24 @@
dnl config.m4 for sapi phpdbg
-PHP_ARG_ENABLE(phpdbg, for phpdbg support,
-[ --enable-phpdbg Build phpdbg], yes, yes)
-
-PHP_ARG_ENABLE(phpdbg-webhelper, for phpdbg web SAPI support,
-[ --enable-phpdbg-webhelper
- Build phpdbg web SAPI support], no)
-
-PHP_ARG_ENABLE(phpdbg-debug, for phpdbg debug build,
-[ --enable-phpdbg-debug Build phpdbg in debug mode], no, no)
+PHP_ARG_ENABLE([phpdbg],
+ [for phpdbg support],
+ [AS_HELP_STRING([--enable-phpdbg],
+ [Build phpdbg])],
+ [yes],
+ [yes])
+
+PHP_ARG_ENABLE([phpdbg-webhelper],
+ [for phpdbg web SAPI support],
+ [AS_HELP_STRING([--enable-phpdbg-webhelper],
+ [Build phpdbg web SAPI support])],
+ [no])
+
+PHP_ARG_ENABLE([phpdbg-debug],
+ [for phpdbg debug build],
+ [AS_HELP_STRING([--enable-phpdbg-debug],
+ [Build phpdbg in debug mode])],
+ [no],
+ [no])
PHP_ARG_ENABLE(phpdbg-readline, for phpdbg readline support,
[ --enable-phpdbg-readline Enable readline support in phpdbg (depends on static ext/readline)], yes, yes)
@@ -82,7 +92,3 @@ fi
if test "$PHP_PHPDBG_WEBHELPER" != "no"; then
PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared)
fi
-
-dnl ## Local Variables:
-dnl ## tab-width: 4
-dnl ## End:
diff --git a/sapi/phpdbg/create-test.php b/sapi/phpdbg/create-test.php
index 3388165d86..e5f7cfe2e9 100644..100755
--- a/sapi/phpdbg/create-test.php
+++ b/sapi/phpdbg/create-test.php
@@ -5,7 +5,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg.1.in b/sapi/phpdbg/phpdbg.1.in
index 80c14941d3..357a50b727 100644
--- a/sapi/phpdbg/phpdbg.1.in
+++ b/sapi/phpdbg/phpdbg.1.in
@@ -1,4 +1,4 @@
-.TH @program_prefix@phpdbg 1 "2018" "The PHP Group" "Scripting Language"
+.TH @program_prefix@phpdbg 1 "2019" "The PHP Group" "Scripting Language"
.SH NAME
@program_prefix@phpdbg \- The interactive PHP debugger
.SH SYNOPSIS
@@ -134,7 +134,7 @@ contributors all around the world.
.SH VERSION INFORMATION
This manpage describes \fBphpdbg\fP, for PHP version @PHP_VERSION@.
.SH COPYRIGHT
-Copyright \(co 1997\-2018 The PHP Group
+Copyright \(co The PHP Group
.LP
This source file is subject to version 3.01 of the PHP license,
that is bundled with this package in the file LICENSE, and is
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 03aaf54431..51c6cde122 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -481,7 +481,7 @@ static zend_always_inline zend_bool phpdbg_is_ignored_opcode(zend_uchar opcode)
return
opcode == ZEND_NOP || opcode == ZEND_OP_DATA || opcode == ZEND_FE_FREE || opcode == ZEND_FREE || opcode == ZEND_ASSERT_CHECK || opcode == ZEND_VERIFY_RETURN_TYPE
|| opcode == ZEND_DECLARE_CONST || opcode == ZEND_DECLARE_CLASS || opcode == ZEND_DECLARE_INHERITED_CLASS || opcode == ZEND_DECLARE_FUNCTION
- || opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED || opcode == ZEND_VERIFY_ABSTRACT_CLASS || opcode == ZEND_ADD_TRAIT || opcode == ZEND_BIND_TRAITS
+ || opcode == ZEND_DECLARE_INHERITED_CLASS_DELAYED
|| opcode == ZEND_DECLARE_ANON_CLASS || opcode == ZEND_DECLARE_ANON_INHERITED_CLASS || opcode == ZEND_FAST_RET || opcode == ZEND_TICKS
|| opcode == ZEND_EXT_STMT || opcode == ZEND_EXT_FCALL_BEGIN || opcode == ZEND_EXT_FCALL_END || opcode == ZEND_EXT_NOP || opcode == ZEND_BIND_GLOBAL
;
@@ -1416,9 +1416,10 @@ int main(int argc, char **argv) /* {{{ */
phpdbg_main:
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
- (void)ts_resource(0);
+ php_tsrm_startup();
+# ifdef PHP_WIN32
ZEND_TSRMLS_CACHE_UPDATE();
+# endif
#endif
zend_signal_startup();
@@ -1664,7 +1665,8 @@ phpdbg_main:
if (settings > (zend_phpdbg_globals *) 0x2) {
#ifdef ZTS
- *((zend_phpdbg_globals *) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(phpdbg_globals_id)]) = *settings;
+ zend_phpdbg_globals *ptr = TSRMG_BULK_STATIC(phpdbg_globals_id, zend_phpdbg_globals *);
+ *ptr = *settings;
#else
phpdbg_globals = *settings;
#endif
@@ -1690,7 +1692,7 @@ phpdbg_main:
phpdbg_do_help_cmd(exec);
} else if (show_version) {
phpdbg_out(
- "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) 1997-2018 The PHP Group\n%s",
+ "phpdbg %s (built: %s %s)\nPHP %s, Copyright (c) The PHP Group\n%s",
PHPDBG_VERSION,
__DATE__,
__TIME__,
@@ -2157,9 +2159,7 @@ phpdbg_out:
zend_hash_destroy(&PHPDBG_G(file_sources));
- zend_try {
- php_module_shutdown();
- } zend_end_try();
+ php_module_shutdown();
#ifndef _WIN32
/* force override (no zend_signals) to prevent crashes due to signal recursion in SIGSEGV/SIGBUS handlers */
diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h
index 72501bffb4..c2298037d4 100644
--- a/sapi/phpdbg/phpdbg.h
+++ b/sapi/phpdbg/phpdbg.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -106,7 +106,7 @@
#define PHPDBG_NAME "phpdbg"
#define PHPDBG_AUTHORS "Felipe Pena, Joe Watkins and Bob Weinand" /* Ordered by last name */
#define PHPDBG_ISSUES "http://bugs.php.net/report.php"
-#define PHPDBG_VERSION "0.5.0"
+#define PHPDBG_VERSION PHP_VERSION
#define PHPDBG_INIT_FILENAME ".phpdbginit"
#define PHPDBG_DEFAULT_PROMPT "prompt>"
/* }}} */
@@ -121,7 +121,7 @@
#if !defined(PHPDBG_WEBDATA_TRANSFER_H) && !defined(PHPDBG_WEBHELPER_H)
#ifdef ZTS
-# define PHPDBG_G(v) TSRMG(phpdbg_globals_id, zend_phpdbg_globals *, v)
+# define PHPDBG_G(v) ZEND_TSRMG(phpdbg_globals_id, zend_phpdbg_globals *, v)
#else
# define PHPDBG_G(v) (phpdbg_globals.v)
#endif
diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c
index c0053005ad..3a47c78470 100644
--- a/sapi/phpdbg/phpdbg_bp.c
+++ b/sapi/phpdbg/phpdbg_bp.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_bp.h b/sapi/phpdbg/phpdbg_bp.h
index 761b0430a7..7e038bb10e 100644
--- a/sapi/phpdbg/phpdbg_bp.h
+++ b/sapi/phpdbg/phpdbg_bp.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_break.c b/sapi/phpdbg/phpdbg_break.c
index 7e07da996a..719d93d166 100644
--- a/sapi/phpdbg/phpdbg_break.c
+++ b/sapi/phpdbg/phpdbg_break.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_break.h b/sapi/phpdbg/phpdbg_break.h
index c0a2d45b05..0aafa592e9 100644
--- a/sapi/phpdbg/phpdbg_break.h
+++ b/sapi/phpdbg/phpdbg_break.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_btree.c b/sapi/phpdbg/phpdbg_btree.c
index 4f5b1e7526..c174920836 100644
--- a/sapi/phpdbg/phpdbg_btree.c
+++ b/sapi/phpdbg/phpdbg_btree.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_btree.h b/sapi/phpdbg/phpdbg_btree.h
index 196e130305..4ffb72697a 100644
--- a/sapi/phpdbg/phpdbg_btree.h
+++ b/sapi/phpdbg/phpdbg_btree.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c
index e93e92190e..b736481089 100644
--- a/sapi/phpdbg/phpdbg_cmd.c
+++ b/sapi/phpdbg/phpdbg_cmd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -573,7 +573,7 @@ PHPDBG_API const phpdbg_command_t *phpdbg_stack_resolve(const phpdbg_command_t *
const phpdbg_command_t *command = commands;
phpdbg_param_t *name = *top;
const phpdbg_command_t *matched[3] = {NULL, NULL, NULL};
- ulong matches = 0L;
+ zend_ulong matches = 0L;
while (command && command->name && command->handler) {
if (name->len == 1 || command->name_len >= name->len) {
@@ -645,7 +645,7 @@ PHPDBG_API const phpdbg_command_t *phpdbg_stack_resolve(const phpdbg_command_t *
}
/* ", " separated matches */
- phpdbg_error("command", "type=\"ambiguous\" command=\"%s\" matches=\"%lu\" matched=\"%s\"", "The command \"%s\" is ambigious, matching %lu commands (%s)", name->str, matches, list);
+ phpdbg_error("command", "type=\"ambiguous\" command=\"%s\" matches=\"%lu\" matched=\"%s\"", "The command \"%s\" is ambiguous, matching %lu commands (%s)", name->str, matches, list);
efree(list);
return NULL;
diff --git a/sapi/phpdbg/phpdbg_cmd.h b/sapi/phpdbg/phpdbg_cmd.h
index f5d5a8d465..b82ed9aceb 100644
--- a/sapi/phpdbg/phpdbg_cmd.h
+++ b/sapi/phpdbg/phpdbg_cmd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_eol.c b/sapi/phpdbg/phpdbg_eol.c
index 25ab833c51..50e0056fa8 100644
--- a/sapi/phpdbg/phpdbg_eol.c
+++ b/sapi/phpdbg/phpdbg_eol.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_eol.h b/sapi/phpdbg/phpdbg_eol.h
index 8d6ee8278e..46141c62cd 100644
--- a/sapi/phpdbg/phpdbg_eol.h
+++ b/sapi/phpdbg/phpdbg_eol.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c
index 2065277dfe..fb7acc20ce 100644
--- a/sapi/phpdbg/phpdbg_frame.c
+++ b/sapi/phpdbg/phpdbg_frame.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_frame.h b/sapi/phpdbg/phpdbg_frame.h
index 05655314c4..d7d9534b1f 100644
--- a/sapi/phpdbg/phpdbg_frame.h
+++ b/sapi/phpdbg/phpdbg_frame.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c
index b328906d3c..32d2485ff9 100644
--- a/sapi/phpdbg/phpdbg_help.c
+++ b/sapi/phpdbg/phpdbg_help.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -924,7 +924,7 @@ phpdbg_help_text_t phpdbg_help_text[] = {
" Enable refcount display when hitting watchpoints" CR CR
" $P S b 4 off" CR
-" Temporarily disable breakpoint 4. This can be subsequently reenabled by a **S b 4 on**." CR
+" Temporarily disable breakpoint 4. This can be subsequently re-enabled by a **S b 4 on**." CR
//*********** check oplog syntax
},
diff --git a/sapi/phpdbg/phpdbg_help.h b/sapi/phpdbg/phpdbg_help.h
index b34d84e538..420e6fb014 100644
--- a/sapi/phpdbg/phpdbg_help.h
+++ b/sapi/phpdbg/phpdbg_help.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_info.c b/sapi/phpdbg/phpdbg_info.c
index 146a45681b..167ada399a 100644
--- a/sapi/phpdbg/phpdbg_info.c
+++ b/sapi/phpdbg/phpdbg_info.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_info.h b/sapi/phpdbg/phpdbg_info.h
index 38137fec14..faf0090bd3 100644
--- a/sapi/phpdbg/phpdbg_info.h
+++ b/sapi/phpdbg/phpdbg_info.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_io.c b/sapi/phpdbg/phpdbg_io.c
index 1f26f7983b..559ff12a60 100644
--- a/sapi/phpdbg/phpdbg_io.c
+++ b/sapi/phpdbg/phpdbg_io.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_io.h b/sapi/phpdbg/phpdbg_io.h
index deda272da2..d875d276cb 100644
--- a/sapi/phpdbg/phpdbg_io.h
+++ b/sapi/phpdbg/phpdbg_io.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_lexer.c b/sapi/phpdbg/phpdbg_lexer.c
deleted file mode 100644
index 2ab0b5ac67..0000000000
--- a/sapi/phpdbg/phpdbg_lexer.c
+++ /dev/null
@@ -1,2085 +0,0 @@
-/* Generated by re2c 1.0.3 */
-#line 1 "sapi/phpdbg/phpdbg_lexer.l"
-/*
- * phpdbg_lexer.l
- */
-
-#include "phpdbg.h"
-#include "phpdbg_cmd.h"
-
-#include "phpdbg_parser.h"
-
-#define LEX(v) (PHPDBG_G(lexer).v)
-
-#define YYCTYPE unsigned char
-#define YYSETCONDITION(x) LEX(state) = x;
-#define YYGETCONDITION() LEX(state)
-#define YYCURSOR LEX(cursor)
-#define YYMARKER LEX(marker)
-#define YYCTXMARKER LEX(ctxmarker)
-#define yyleng LEX(len)
-#define yytext ((char*) LEX(text))
-#undef YYDEBUG
-#define YYDEBUG(a, b)
-#define YYFILL(n)
-
-#define NORMAL 0
-#define PRE_RAW 1
-#define RAW 2
-#define INITIAL 3
-
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
-
-void phpdbg_init_lexer (phpdbg_param_t *stack, char *input) {
- PHPDBG_G(parser_stack) = stack;
-
- YYSETCONDITION(INITIAL);
-
- LEX(text) = YYCURSOR = (unsigned char *) input;
- LEX(len) = strlen(input);
-}
-
-static int unescape_string(char *s) {
- switch (*s) {
- case '\'':
- case '\"': {
- char start = *s;
- size_t off = 1;
- do {
- if (s[off] == '\\') {
- off++;
- }
- *s = s[off];
- } while ((++s)[off] != start);
- return off + 1;
- }
- }
-
- return 0;
-}
-
-int phpdbg_lex (phpdbg_param_t* yylval) {
-
-restart:
- LEX(text) = YYCURSOR;
-
-
-#line 68 "sapi/phpdbg/phpdbg_lexer.c"
-{
- YYCTYPE yych;
- unsigned int yyaccept = 0;
- if (YYGETCONDITION() < 2) {
- if (YYGETCONDITION() < 1) {
- goto yyc_NORMAL;
- } else {
- goto yyc_PRE_RAW;
- }
- } else {
- if (YYGETCONDITION() < 3) {
- goto yyc_RAW;
- } else {
- goto yyc_INITIAL;
- }
- }
-/* *********************************** */
-yyc_NORMAL:
- {
- static const unsigned char yybm[] = {
- /* table 1 .. 8: 0 */
- 0, 62, 62, 62, 62, 62, 62, 62,
- 62, 40, 0, 62, 62, 40, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 40, 62, 50, 40, 62, 62, 62, 14,
- 62, 62, 62, 62, 62, 62, 63, 62,
- 127, 127, 127, 127, 127, 127, 127, 127,
- 127, 127, 40, 62, 62, 62, 62, 62,
- 62, 254, 254, 254, 254, 254, 254, 190,
- 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 62, 2, 62, 62, 62,
- 62, 254, 254, 254, 254, 254, 254, 190,
- 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 190, 190, 190, 190, 190,
- 190, 190, 190, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- 62, 62, 62, 62, 62, 62, 62, 62,
- /* table 9 .. 10: 256 */
- 0, 64, 64, 64, 64, 64, 64, 64,
- 64, 128, 0, 64, 64, 128, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 128, 64, 0, 0, 64, 64, 64, 0,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 0, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- 64, 64, 64, 64, 64, 64, 64, 64,
- };
- YYDEBUG(1, *YYCURSOR);
- YYFILL(11);
- yych = *YYCURSOR;
- if (yybm[256+yych] & 128) {
- goto yy8;
- }
- switch (yych) {
- case 0x00:
- case '\t':
- case '\n': goto yy3;
- case '"': goto yy11;
- case '#': goto yy13;
- case '\'': goto yy15;
- case '-': goto yy16;
- case '.':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9': goto yy17;
- case '0': goto yy20;
- case ':': goto yy21;
- case 'D':
- case 'd': goto yy22;
- case 'E':
- case 'e': goto yy23;
- case 'F':
- case 'f': goto yy24;
- case 'I':
- case 'i': goto yy25;
- case 'N':
- case 'n': goto yy26;
- case 'O':
- case 'o': goto yy27;
- case 'T':
- case 't': goto yy28;
- case 'Y':
- case 'y': goto yy29;
- case 'Z': goto yy30;
- case 'z': goto yy31;
- default: goto yy5;
- }
-yy3:
- YYDEBUG(3, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(4, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 89 "sapi/phpdbg/phpdbg_lexer.l"
- {
- return 0;
-}
-#line 211 "sapi/phpdbg/phpdbg_lexer.c"
-yy5:
- YYDEBUG(5, *YYCURSOR);
- yyaccept = 0;
- YYMARKER = ++YYCURSOR;
- YYFILL(3);
- yych = *YYCURSOR;
-yy6:
- YYDEBUG(6, *YYCURSOR);
- if (yybm[256+yych] & 64) {
- goto yy5;
- }
- if (yych <= ' ') goto yy7;
- if (yych == '#') goto yy7;
- if (yych <= '\'') goto yy32;
- goto yy34;
-yy7:
- YYDEBUG(7, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 161 "sapi/phpdbg/phpdbg_lexer.l"
- {
- phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = estrndup(yytext, yyleng - unescape_string(yytext));
- yylval->len = yyleng;
- return T_ID;
-}
-#line 237 "sapi/phpdbg/phpdbg_lexer.c"
-yy8:
- YYDEBUG(8, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(9, *YYCURSOR);
- if (yybm[256+yych] & 128) {
- goto yy8;
- }
- YYDEBUG(10, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 175 "sapi/phpdbg/phpdbg_lexer.l"
- {
- /* ignore whitespace */
-
- goto restart;
-}
-#line 255 "sapi/phpdbg/phpdbg_lexer.c"
-yy11:
- YYDEBUG(11, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '"') goto yy32;
- goto yy36;
-yy12:
- YYDEBUG(12, *YYCURSOR);
- YYCURSOR = YYMARKER;
- if (yyaccept <= 3) {
- if (yyaccept <= 1) {
- if (yyaccept == 0) {
- goto yy7;
- } else {
- goto yy14;
- }
- } else {
- if (yyaccept == 2) {
- goto yy19;
- } else {
- goto yy83;
- }
- }
- } else {
- if (yyaccept <= 5) {
- if (yyaccept == 4) {
- goto yy86;
- } else {
- goto yy102;
- }
- } else {
- goto yy119;
- }
- }
-yy13:
- YYDEBUG(13, *YYCURSOR);
- yyaccept = 1;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '.') {
- if (yych <= ',') goto yy14;
- if (yych <= '-') {
- YYCTXMARKER = YYCURSOR;
- goto yy41;
- }
- YYCTXMARKER = YYCURSOR;
- goto yy42;
- } else {
- if (yych <= '/') goto yy14;
- if (yych <= '9') {
- YYCTXMARKER = YYCURSOR;
- goto yy42;
- }
- }
-yy14:
- YYDEBUG(14, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 110 "sapi/phpdbg/phpdbg_lexer.l"
- {
- YYSETCONDITION(INITIAL);
- return T_SEPARATOR;
-}
-#line 316 "sapi/phpdbg/phpdbg_lexer.c"
-yy15:
- YYDEBUG(15, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '\'') goto yy32;
- goto yy46;
-yy16:
- YYDEBUG(16, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 1) {
- goto yy17;
- }
- if (yych == 'r') goto yy51;
- goto yy6;
-yy17:
- YYDEBUG(17, *YYCURSOR);
- yyaccept = 2;
- YYMARKER = ++YYCURSOR;
- YYFILL(3);
- yych = *YYCURSOR;
- YYDEBUG(18, *YYCURSOR);
- if (yybm[0+yych] & 1) {
- goto yy17;
- }
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy19;
- if (yych <= 0x08) goto yy5;
- } else {
- if (yych == '\r') goto yy19;
- if (yych <= 0x1F) goto yy5;
- }
- } else {
- if (yych <= '&') {
- if (yych <= '!') goto yy5;
- if (yych <= '"') goto yy32;
- if (yych >= '$') goto yy5;
- } else {
- if (yych <= '\'') goto yy32;
- if (yych <= '/') goto yy5;
- if (yych <= ':') goto yy34;
- goto yy5;
- }
- }
-yy19:
- YYDEBUG(19, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 142 "sapi/phpdbg/phpdbg_lexer.l"
- {
- phpdbg_init_param(yylval, NUMERIC_PARAM);
- yylval->num = atoi(yytext);
- return T_DIGITS;
-}
-#line 370 "sapi/phpdbg/phpdbg_lexer.c"
-yy20:
- YYDEBUG(20, *YYCURSOR);
- yyaccept = 2;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 1) {
- goto yy17;
- }
- if (yych <= 0x1F) {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy19;
- if (yych <= 0x08) goto yy6;
- goto yy19;
- } else {
- if (yych == '\r') goto yy19;
- goto yy6;
- }
- } else {
- if (yych <= '#') {
- if (yych <= ' ') goto yy19;
- if (yych <= '"') goto yy6;
- goto yy19;
- } else {
- if (yych == 'x') goto yy52;
- goto yy6;
- }
- }
-yy21:
- YYDEBUG(21, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == ':') goto yy55;
- if (yych == '\\') goto yy57;
- goto yy53;
-yy22:
- YYDEBUG(22, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'I') goto yy59;
- if (yych == 'i') goto yy59;
- goto yy6;
-yy23:
- YYDEBUG(23, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'N') goto yy60;
- if (yych == 'n') goto yy60;
- goto yy6;
-yy24:
- YYDEBUG(24, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'A') goto yy61;
- if (yych == 'a') goto yy61;
- goto yy6;
-yy25:
- YYDEBUG(25, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'F') goto yy62;
- if (yych == 'f') goto yy62;
- goto yy6;
-yy26:
- YYDEBUG(26, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'O') goto yy63;
- if (yych == 'o') goto yy63;
- goto yy6;
-yy27:
- YYDEBUG(27, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 'N') {
- if (yych == 'F') goto yy64;
- if (yych <= 'M') goto yy6;
- goto yy65;
- } else {
- if (yych <= 'f') {
- if (yych <= 'e') goto yy6;
- goto yy64;
- } else {
- if (yych == 'n') goto yy65;
- goto yy6;
- }
- }
-yy28:
- YYDEBUG(28, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'R') goto yy66;
- if (yych == 'r') goto yy66;
- goto yy6;
-yy29:
- YYDEBUG(29, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy67;
- if (yych == 'e') goto yy67;
- goto yy6;
-yy30:
- YYDEBUG(30, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy68;
- goto yy6;
-yy31:
- YYDEBUG(31, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'e') goto yy69;
- goto yy6;
-yy32:
- YYDEBUG(32, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(3);
- yych = *YYCURSOR;
-yy33:
- YYDEBUG(33, *YYCURSOR);
- if (yybm[0+yych] & 2) {
- goto yy32;
- }
- if (yych <= '#') goto yy12;
- goto yy70;
-yy34:
- YYDEBUG(34, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '/') goto yy71;
- if (yych == '\\') goto yy57;
- goto yy12;
-yy35:
- YYDEBUG(35, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(4);
- yych = *YYCURSOR;
-yy36:
- YYDEBUG(36, *YYCURSOR);
- if (yybm[0+yych] & 4) {
- goto yy35;
- }
- if (yych <= ' ') {
- if (yych <= 0x00) goto yy12;
- if (yych == '\n') goto yy12;
- } else {
- if (yych <= '"') goto yy72;
- if (yych <= '#') goto yy37;
- if (yych <= ':') goto yy39;
- goto yy40;
- }
-yy37:
- YYDEBUG(37, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
-yy38:
- YYDEBUG(38, *YYCURSOR);
- if (yybm[0+yych] & 8) {
- goto yy37;
- }
- if (yych <= '\n') goto yy12;
- if (yych <= '"') goto yy73;
- goto yy74;
-yy39:
- YYDEBUG(39, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '/') goto yy75;
- goto yy38;
-yy40:
- YYDEBUG(40, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(3);
- yych = *YYCURSOR;
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy12;
- if (yych <= 0x08) goto yy32;
- goto yy12;
- } else {
- if (yych == '\r') goto yy12;
- if (yych <= 0x1F) goto yy32;
- goto yy12;
- }
- } else {
- if (yych <= '9') {
- if (yych <= '!') goto yy32;
- if (yych <= '"') goto yy35;
- if (yych <= '#') goto yy12;
- goto yy32;
- } else {
- if (yych <= ':') goto yy70;
- if (yych == '\\') goto yy35;
- goto yy32;
- }
- }
-yy41:
- YYDEBUG(41, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '.') goto yy42;
- if (yych <= '/') goto yy12;
- if (yych >= ':') goto yy12;
-yy42:
- YYDEBUG(42, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(43, *YYCURSOR);
- if (yych == '.') goto yy42;
- if (yych <= '/') goto yy44;
- if (yych <= '9') goto yy42;
-yy44:
- YYDEBUG(44, *YYCURSOR);
- YYCURSOR = YYCTXMARKER;
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 106 "sapi/phpdbg/phpdbg_lexer.l"
- {
- return T_POUND;
-}
-#line 586 "sapi/phpdbg/phpdbg_lexer.c"
-yy45:
- YYDEBUG(45, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(4);
- yych = *YYCURSOR;
-yy46:
- YYDEBUG(46, *YYCURSOR);
- if (yybm[0+yych] & 16) {
- goto yy45;
- }
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy12;
- if (yych >= '\n') goto yy12;
- } else {
- if (yych <= '#') goto yy47;
- if (yych <= '\'') goto yy72;
- if (yych <= ':') goto yy49;
- goto yy50;
- }
-yy47:
- YYDEBUG(47, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
-yy48:
- YYDEBUG(48, *YYCURSOR);
- if (yybm[0+yych] & 32) {
- goto yy47;
- }
- if (yych <= '\n') goto yy12;
- if (yych <= '\'') goto yy73;
- goto yy76;
-yy49:
- YYDEBUG(49, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '/') goto yy77;
- goto yy48;
-yy50:
- YYDEBUG(50, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(3);
- yych = *YYCURSOR;
- if (yych <= '"') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy12;
- if (yych <= 0x08) goto yy32;
- if (yych <= '\n') goto yy12;
- goto yy32;
- } else {
- if (yych <= '\r') goto yy12;
- if (yych == ' ') goto yy12;
- goto yy32;
- }
- } else {
- if (yych <= '9') {
- if (yych <= '#') goto yy12;
- if (yych == '\'') goto yy45;
- goto yy32;
- } else {
- if (yych <= ':') goto yy70;
- if (yych == '\\') goto yy45;
- goto yy32;
- }
- }
-yy51:
- YYDEBUG(51, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych == '\t') goto yy78;
- goto yy6;
- } else {
- if (yych <= '\r') goto yy78;
- if (yych <= 0x1F) goto yy6;
- goto yy78;
- }
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy6;
- if (yych <= '-') goto yy80;
- goto yy81;
- } else {
- if (yych <= '/') goto yy6;
- if (yych <= '9') goto yy81;
- goto yy6;
- }
- }
-yy52:
- YYDEBUG(52, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy84;
- }
- goto yy6;
-yy53:
- YYDEBUG(53, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(54, *YYCURSOR);
- YYCURSOR -= 1;
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 119 "sapi/phpdbg/phpdbg_lexer.l"
- {
- return T_COLON;
-}
-#line 693 "sapi/phpdbg/phpdbg_lexer.c"
-yy55:
- YYDEBUG(55, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(56, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 115 "sapi/phpdbg/phpdbg_lexer.l"
- {
- return T_DCOLON;
-}
-#line 703 "sapi/phpdbg/phpdbg_lexer.c"
-yy57:
- YYDEBUG(57, *YYCURSOR);
- yyaccept = 0;
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(58, *YYCURSOR);
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy7;
- if (yych <= 0x08) goto yy57;
- goto yy7;
- } else {
- if (yych == '\r') goto yy7;
- if (yych <= 0x1F) goto yy57;
- goto yy7;
- }
- } else {
- if (yych <= '&') {
- if (yych <= '!') goto yy57;
- if (yych <= '#') goto yy7;
- goto yy57;
- } else {
- if (yych <= '\'') goto yy7;
- if (yych == ':') goto yy87;
- goto yy57;
- }
- }
-yy59:
- YYDEBUG(59, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'S') goto yy88;
- if (yych == 's') goto yy88;
- goto yy6;
-yy60:
- YYDEBUG(60, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'A') goto yy89;
- if (yych == 'a') goto yy89;
- goto yy6;
-yy61:
- YYDEBUG(61, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'L') goto yy90;
- if (yych == 'l') goto yy90;
- goto yy6;
-yy62:
- YYDEBUG(62, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '\f') {
- if (yych == '\t') goto yy91;
- goto yy6;
- } else {
- if (yych <= '\r') goto yy91;
- if (yych == ' ') goto yy91;
- goto yy6;
- }
-yy63:
- YYDEBUG(63, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy94;
- if (yych <= 0x08) goto yy6;
- if (yych <= '\n') goto yy94;
- goto yy6;
- } else {
- if (yych <= '\r') goto yy94;
- if (yych == ' ') goto yy94;
- goto yy6;
- }
-yy64:
- YYDEBUG(64, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'F') goto yy63;
- if (yych == 'f') goto yy63;
- goto yy6;
-yy65:
- YYDEBUG(65, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy96;
- if (yych <= 0x08) goto yy6;
- if (yych <= '\n') goto yy96;
- goto yy6;
- } else {
- if (yych <= '\r') goto yy96;
- if (yych == ' ') goto yy96;
- goto yy6;
- }
-yy66:
- YYDEBUG(66, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'U') goto yy98;
- if (yych == 'u') goto yy98;
- goto yy6;
-yy67:
- YYDEBUG(67, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'S') goto yy65;
- if (yych == 's') goto yy65;
- goto yy6;
-yy68:
- YYDEBUG(68, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'N') goto yy99;
- goto yy6;
-yy69:
- YYDEBUG(69, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'n') goto yy100;
- goto yy6;
-yy70:
- YYDEBUG(70, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych != '/') goto yy12;
-yy71:
- YYDEBUG(71, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '/') goto yy101;
- goto yy12;
-yy72:
- YYDEBUG(72, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= '\r') {
- if (yych <= 0x08) {
- if (yych <= 0x00) goto yy7;
- goto yy33;
- } else {
- if (yych <= '\n') goto yy7;
- if (yych <= '\f') goto yy33;
- goto yy7;
- }
- } else {
- if (yych <= ' ') {
- if (yych <= 0x1F) goto yy33;
- goto yy7;
- } else {
- if (yych == '#') goto yy7;
- goto yy33;
- }
- }
-yy73:
- YYDEBUG(73, *YYCURSOR);
- ++YYCURSOR;
- goto yy7;
-yy74:
- YYDEBUG(74, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yych == '"') goto yy37;
- if (yych == '\\') goto yy37;
- goto yy12;
-yy75:
- YYDEBUG(75, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '/') goto yy103;
- goto yy38;
-yy76:
- YYDEBUG(76, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yych == '\'') goto yy47;
- if (yych == '\\') goto yy47;
- goto yy12;
-yy77:
- YYDEBUG(77, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '/') goto yy104;
- goto yy48;
-yy78:
- YYDEBUG(78, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(2);
- yych = *YYCURSOR;
- YYDEBUG(79, *YYCURSOR);
- if (yych <= ' ') {
- if (yych <= '\f') {
- if (yych == '\t') goto yy78;
- goto yy12;
- } else {
- if (yych <= '\r') goto yy78;
- if (yych <= 0x1F) goto yy12;
- goto yy78;
- }
- } else {
- if (yych <= '.') {
- if (yych <= ',') goto yy12;
- if (yych <= '-') goto yy105;
- goto yy106;
- } else {
- if (yych <= '/') goto yy12;
- if (yych <= '9') goto yy106;
- goto yy12;
- }
- }
-yy80:
- YYDEBUG(80, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '.') goto yy81;
- if (yych <= '/') goto yy6;
- if (yych >= ':') goto yy6;
-yy81:
- YYDEBUG(81, *YYCURSOR);
- yyaccept = 3;
- YYMARKER = ++YYCURSOR;
- YYFILL(3);
- yych = *YYCURSOR;
- YYDEBUG(82, *YYCURSOR);
- if (yych <= '"') {
- if (yych <= '\f') {
- if (yych <= 0x00) goto yy83;
- if (yych <= 0x08) goto yy5;
- if (yych >= '\v') goto yy5;
- } else {
- if (yych <= 0x1F) {
- if (yych >= 0x0E) goto yy5;
- } else {
- if (yych <= ' ') goto yy83;
- if (yych <= '!') goto yy5;
- goto yy32;
- }
- }
- } else {
- if (yych <= '-') {
- if (yych <= '#') goto yy83;
- if (yych == '\'') goto yy32;
- goto yy5;
- } else {
- if (yych <= '/') {
- if (yych <= '.') goto yy81;
- goto yy5;
- } else {
- if (yych <= '9') goto yy81;
- if (yych <= ':') goto yy34;
- goto yy5;
- }
- }
- }
-yy83:
- YYDEBUG(83, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 93 "sapi/phpdbg/phpdbg_lexer.l"
- {
- char *text = yytext + 2;
- while (*++text < '0');
- yylval->num = atoi(text);
- return T_REQ_ID;
-}
-#line 967 "sapi/phpdbg/phpdbg_lexer.c"
-yy84:
- YYDEBUG(84, *YYCURSOR);
- yyaccept = 4;
- YYMARKER = ++YYCURSOR;
- YYFILL(3);
- yych = *YYCURSOR;
- YYDEBUG(85, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy84;
- }
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy86;
- if (yych <= 0x08) goto yy5;
- } else {
- if (yych == '\r') goto yy86;
- if (yych <= 0x1F) goto yy5;
- }
- } else {
- if (yych <= '&') {
- if (yych <= '!') goto yy5;
- if (yych <= '"') goto yy32;
- if (yych >= '$') goto yy5;
- } else {
- if (yych <= '\'') goto yy32;
- if (yych <= '/') goto yy5;
- if (yych <= ':') goto yy34;
- goto yy5;
- }
- }
-yy86:
- YYDEBUG(86, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 148 "sapi/phpdbg/phpdbg_lexer.l"
- {
- phpdbg_init_param(yylval, ADDR_PARAM);
- yylval->addr = strtoul(yytext, 0, 16);
- return T_ADDR;
-}
-#line 1007 "sapi/phpdbg/phpdbg_lexer.c"
-yy87:
- YYDEBUG(87, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yych == '\\') goto yy57;
- goto yy12;
-yy88:
- YYDEBUG(88, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'A') goto yy108;
- if (yych == 'a') goto yy108;
- goto yy6;
-yy89:
- YYDEBUG(89, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'B') goto yy109;
- if (yych == 'b') goto yy109;
- goto yy6;
-yy90:
- YYDEBUG(90, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'S') goto yy110;
- if (yych == 's') goto yy110;
- goto yy6;
-yy91:
- YYDEBUG(91, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(92, *YYCURSOR);
- if (yych <= '\f') {
- if (yych == '\t') goto yy91;
- } else {
- if (yych <= '\r') goto yy91;
- if (yych == ' ') goto yy91;
- }
- YYDEBUG(93, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 100 "sapi/phpdbg/phpdbg_lexer.l"
- {
- YYSETCONDITION(RAW);
- phpdbg_init_param(yylval, EMPTY_PARAM);
- return T_IF;
-}
-#line 1056 "sapi/phpdbg/phpdbg_lexer.c"
-yy94:
- YYDEBUG(94, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(95, *YYCURSOR);
- YYCURSOR -= 1;
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 136 "sapi/phpdbg/phpdbg_lexer.l"
- {
- phpdbg_init_param(yylval, NUMERIC_PARAM);
- yylval->num = 0;
- return T_FALSY;
-}
-#line 1069 "sapi/phpdbg/phpdbg_lexer.c"
-yy96:
- YYDEBUG(96, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(97, *YYCURSOR);
- YYCURSOR -= 1;
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 130 "sapi/phpdbg/phpdbg_lexer.l"
- {
- phpdbg_init_param(yylval, NUMERIC_PARAM);
- yylval->num = 1;
- return T_TRUTHY;
-}
-#line 1082 "sapi/phpdbg/phpdbg_lexer.c"
-yy98:
- YYDEBUG(98, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy65;
- if (yych == 'e') goto yy65;
- goto yy6;
-yy99:
- YYDEBUG(99, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'D') goto yy111;
- goto yy6;
-yy100:
- YYDEBUG(100, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'd') goto yy111;
- goto yy6;
-yy101:
- YYDEBUG(101, *YYCURSOR);
- ++YYCURSOR;
-yy102:
- YYDEBUG(102, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 123 "sapi/phpdbg/phpdbg_lexer.l"
- {
- phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = estrndup(yytext, yyleng);
- yylval->len = yyleng;
- return T_PROTO;
-}
-#line 1115 "sapi/phpdbg/phpdbg_lexer.c"
-yy103:
- YYDEBUG(103, *YYCURSOR);
- yyaccept = 5;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x00) goto yy102;
- if (yych == '\n') goto yy102;
- goto yy38;
-yy104:
- YYDEBUG(104, *YYCURSOR);
- yyaccept = 5;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x00) goto yy102;
- if (yych == '\n') goto yy102;
- goto yy48;
-yy105:
- YYDEBUG(105, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == '.') goto yy106;
- if (yych <= '/') goto yy12;
- if (yych >= ':') goto yy12;
-yy106:
- YYDEBUG(106, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(107, *YYCURSOR);
- if (yych == '.') goto yy106;
- if (yych <= '/') goto yy83;
- if (yych <= '9') goto yy106;
- goto yy83;
-yy108:
- YYDEBUG(108, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'B') goto yy112;
- if (yych == 'b') goto yy112;
- goto yy6;
-yy109:
- YYDEBUG(109, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'L') goto yy113;
- if (yych == 'l') goto yy113;
- goto yy6;
-yy110:
- YYDEBUG(110, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy63;
- if (yych == 'e') goto yy63;
- goto yy6;
-yy111:
- YYDEBUG(111, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == '_') goto yy114;
- goto yy6;
-yy112:
- YYDEBUG(112, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'L') goto yy115;
- if (yych == 'l') goto yy115;
- goto yy6;
-yy113:
- YYDEBUG(113, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy116;
- if (yych == 'e') goto yy116;
- goto yy6;
-yy114:
- YYDEBUG(114, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy117;
- }
- goto yy6;
-yy115:
- YYDEBUG(115, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'E') goto yy120;
- if (yych == 'e') goto yy120;
- goto yy6;
-yy116:
- YYDEBUG(116, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'D') goto yy65;
- if (yych == 'd') goto yy65;
- goto yy6;
-yy117:
- YYDEBUG(117, *YYCURSOR);
- yyaccept = 6;
- YYMARKER = ++YYCURSOR;
- YYFILL(3);
- yych = *YYCURSOR;
- YYDEBUG(118, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy117;
- }
- if (yych <= ' ') {
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy119;
- if (yych <= 0x08) goto yy5;
- } else {
- if (yych == '\r') goto yy119;
- if (yych <= 0x1F) goto yy5;
- }
- } else {
- if (yych <= '&') {
- if (yych <= '!') goto yy5;
- if (yych <= '"') goto yy32;
- if (yych >= '$') goto yy5;
- } else {
- if (yych <= '\'') goto yy32;
- if (yych == ':') goto yy34;
- goto yy5;
- }
- }
-yy119:
- YYDEBUG(119, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 154 "sapi/phpdbg/phpdbg_lexer.l"
- {
- phpdbg_init_param(yylval, OP_PARAM);
- yylval->str = estrndup(yytext, yyleng);
- yylval->len = yyleng;
- return T_OPCODE;
-}
-#line 1248 "sapi/phpdbg/phpdbg_lexer.c"
-yy120:
- YYDEBUG(120, *YYCURSOR);
- yyaccept = 0;
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'D') goto yy63;
- if (yych == 'd') goto yy63;
- goto yy6;
- }
-/* *********************************** */
-yyc_PRE_RAW:
- {
- static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 64, 0, 0, 0, 64, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 64, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 128, 0,
- 128, 128, 128, 128, 128, 128, 128, 128,
- 128, 128, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
- YYDEBUG(121, *YYCURSOR);
- YYFILL(2);
- yych = *YYCURSOR;
- if (yych <= '\r') {
- if (yych == '\t') goto yy125;
- if (yych >= '\r') goto yy125;
- } else {
- if (yych <= ' ') {
- if (yych >= ' ') goto yy126;
- } else {
- if (yych == '-') goto yy129;
- }
- }
- YYDEBUG(123, *YYCURSOR);
- ++YYCURSOR;
-yy124:
- YYDEBUG(124, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 199 "sapi/phpdbg/phpdbg_lexer.l"
- {
- YYSETCONDITION(RAW);
-
- YYCURSOR = LEX(text);
- goto restart;
-}
-#line 1319 "sapi/phpdbg/phpdbg_lexer.c"
-yy125:
- YYDEBUG(125, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy126;
- }
- goto yy124;
-yy126:
- YYDEBUG(126, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(127, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy126;
- }
- YYDEBUG(128, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 175 "sapi/phpdbg/phpdbg_lexer.l"
- {
- /* ignore whitespace */
-
- goto restart;
-}
-#line 1344 "sapi/phpdbg/phpdbg_lexer.c"
-yy129:
- YYDEBUG(129, *YYCURSOR);
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych != 'r') goto yy124;
-yy130:
- YYDEBUG(130, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(2);
- yych = *YYCURSOR;
- YYDEBUG(131, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy134;
- }
- if (yych <= '\r') {
- if (yych == '\t') goto yy130;
- if (yych >= '\r') goto yy130;
- } else {
- if (yych <= ' ') {
- if (yych >= ' ') goto yy130;
- } else {
- if (yych == '-') goto yy133;
- }
- }
-yy132:
- YYDEBUG(132, *YYCURSOR);
- YYCURSOR = YYMARKER;
- goto yy124;
-yy133:
- YYDEBUG(133, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy134;
- }
- goto yy132;
-yy134:
- YYDEBUG(134, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(135, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy134;
- }
- YYDEBUG(136, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 93 "sapi/phpdbg/phpdbg_lexer.l"
- {
- char *text = yytext + 2;
- while (*++text < '0');
- yylval->num = atoi(text);
- return T_REQ_ID;
-}
-#line 1397 "sapi/phpdbg/phpdbg_lexer.c"
- }
-/* *********************************** */
-yyc_RAW:
- {
- static const unsigned char yybm[] = {
- 0, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 0, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 64, 224, 232, 232, 232, 32,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 16, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- 232, 232, 232, 232, 232, 232, 232, 232,
- };
- YYDEBUG(137, *YYCURSOR);
- YYFILL(1);
- yych = *YYCURSOR;
- if (yybm[0+yych] & 8) {
- goto yy141;
- }
- if (yych <= '\n') goto yy139;
- if (yych <= '"') goto yy144;
- if (yych <= '#') goto yy146;
- if (yych <= '\'') goto yy148;
- goto yy149;
-yy139:
- YYDEBUG(139, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(140, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 89 "sapi/phpdbg/phpdbg_lexer.l"
- {
- return 0;
-}
-#line 1456 "sapi/phpdbg/phpdbg_lexer.c"
-yy141:
- YYDEBUG(141, *YYCURSOR);
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(142, *YYCURSOR);
- if (yybm[0+yych] & 8) {
- goto yy141;
- }
- if (yych <= '\n') goto yy143;
- if (yych <= '"') goto yy144;
- if (yych <= '#') goto yy143;
- if (yych <= '\'') goto yy148;
- goto yy149;
-yy143:
- YYDEBUG(143, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 168 "sapi/phpdbg/phpdbg_lexer.l"
- {
- phpdbg_init_param(yylval, STR_PARAM);
- yylval->str = estrdup(yytext);
- yylval->len = yyleng;
- return T_INPUT;
-}
-#line 1481 "sapi/phpdbg/phpdbg_lexer.c"
-yy144:
- YYDEBUG(144, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yybm[0+yych] & 32) {
- goto yy151;
- }
- if (yych >= '#') goto yy153;
-yy145:
- YYDEBUG(145, *YYCURSOR);
- YYCURSOR = YYMARKER;
- goto yy143;
-yy146:
- YYDEBUG(146, *YYCURSOR);
- ++YYCURSOR;
- YYDEBUG(147, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 110 "sapi/phpdbg/phpdbg_lexer.l"
- {
- YYSETCONDITION(INITIAL);
- return T_SEPARATOR;
-}
-#line 1505 "sapi/phpdbg/phpdbg_lexer.c"
-yy148:
- YYDEBUG(148, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yybm[0+yych] & 64) {
- goto yy155;
- }
- if (yych <= '\'') goto yy145;
- goto yy157;
-yy149:
- YYDEBUG(149, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(150, *YYCURSOR);
- if (yybm[0+yych] & 16) {
- goto yy149;
- }
- if (yych <= '!') {
- if (yych <= 0x00) goto yy143;
- if (yych == '\n') goto yy143;
- goto yy141;
- } else {
- if (yych <= '"') goto yy159;
- if (yych == '\'') goto yy160;
- goto yy141;
- }
-yy151:
- YYDEBUG(151, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(152, *YYCURSOR);
- if (yybm[0+yych] & 32) {
- goto yy151;
- }
- if (yych <= '\n') goto yy145;
- if (yych <= '"') goto yy141;
-yy153:
- YYDEBUG(153, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(154, *YYCURSOR);
- if (yybm[0+yych] & 32) {
- goto yy151;
- }
- if (yych <= '\n') goto yy145;
- if (yych <= '"') goto yy161;
- goto yy153;
-yy155:
- YYDEBUG(155, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(156, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy155;
- }
- if (yych <= '\n') goto yy145;
- if (yych <= '\'') goto yy141;
-yy157:
- YYDEBUG(157, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(158, *YYCURSOR);
- if (yybm[0+yych] & 64) {
- goto yy155;
- }
- if (yych <= '\n') goto yy145;
- if (yych <= '\'') goto yy163;
- goto yy157;
-yy159:
- YYDEBUG(159, *YYCURSOR);
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yych <= '"') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy143;
- goto yy161;
- } else {
- if (yych <= '\n') goto yy143;
- if (yych <= '!') goto yy161;
- goto yy144;
- }
- } else {
- if (yych <= '\'') {
- if (yych <= '#') goto yy151;
- if (yych <= '&') goto yy161;
- goto yy165;
- } else {
- if (yych == '\\') goto yy166;
- goto yy161;
- }
- }
-yy160:
- YYDEBUG(160, *YYCURSOR);
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yych <= '"') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy143;
- goto yy163;
- } else {
- if (yych <= '\n') goto yy143;
- if (yych <= '!') goto yy163;
- goto yy168;
- }
- } else {
- if (yych <= '\'') {
- if (yych <= '#') goto yy155;
- if (yych <= '&') goto yy163;
- goto yy148;
- } else {
- if (yych == '\\') goto yy169;
- goto yy163;
- }
- }
-yy161:
- YYDEBUG(161, *YYCURSOR);
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(162, *YYCURSOR);
- if (yych <= '"') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy143;
- goto yy161;
- } else {
- if (yych <= '\n') goto yy143;
- if (yych <= '!') goto yy161;
- goto yy159;
- }
- } else {
- if (yych <= '\'') {
- if (yych <= '#') goto yy151;
- if (yych <= '&') goto yy161;
- goto yy165;
- } else {
- if (yych == '\\') goto yy166;
- goto yy161;
- }
- }
-yy163:
- YYDEBUG(163, *YYCURSOR);
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(164, *YYCURSOR);
- if (yych <= '"') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy143;
- goto yy163;
- } else {
- if (yych <= '\n') goto yy143;
- if (yych <= '!') goto yy163;
- goto yy168;
- }
- } else {
- if (yych <= '\'') {
- if (yych <= '#') goto yy155;
- if (yych <= '&') goto yy163;
- goto yy160;
- } else {
- if (yych == '\\') goto yy169;
- goto yy163;
- }
- }
-yy165:
- YYDEBUG(165, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy171;
- }
- if (yych <= '\n') goto yy145;
- if (yych <= '"') goto yy163;
- if (yych <= '\'') goto yy151;
- goto yy173;
-yy166:
- YYDEBUG(166, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(167, *YYCURSOR);
- if (yych <= '&') {
- if (yych <= 0x00) goto yy143;
- if (yych == '\n') goto yy143;
- goto yy161;
- } else {
- if (yych <= '\'') goto yy175;
- if (yych == '\\') goto yy166;
- goto yy161;
- }
-yy168:
- YYDEBUG(168, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy171;
- }
- if (yych <= '\n') goto yy145;
- if (yych <= '"') goto yy155;
- if (yych <= '\'') goto yy161;
- goto yy173;
-yy169:
- YYDEBUG(169, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(170, *YYCURSOR);
- if (yych <= '!') {
- if (yych <= 0x00) goto yy143;
- if (yych == '\n') goto yy143;
- goto yy163;
- } else {
- if (yych <= '"') goto yy176;
- if (yych == '\\') goto yy169;
- goto yy163;
- }
-yy171:
- YYDEBUG(171, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(172, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy171;
- }
- if (yych <= '\n') goto yy145;
- if (yych <= '"') goto yy163;
- if (yych <= '\'') goto yy161;
-yy173:
- YYDEBUG(173, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(174, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy171;
- }
- if (yych <= '\n') goto yy145;
- if (yych <= '\'') goto yy177;
- goto yy173;
-yy175:
- YYDEBUG(175, *YYCURSOR);
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yych <= '"') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy143;
- goto yy177;
- } else {
- if (yych <= '\n') goto yy143;
- if (yych <= '!') goto yy177;
- }
- } else {
- if (yych <= '\'') {
- if (yych <= '#') goto yy171;
- if (yych <= '&') goto yy177;
- goto yy165;
- } else {
- if (yych == '\\') goto yy179;
- goto yy177;
- }
- }
-yy176:
- YYDEBUG(176, *YYCURSOR);
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- if (yych <= '"') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy143;
- } else {
- if (yych <= '\n') goto yy143;
- if (yych >= '"') goto yy168;
- }
- } else {
- if (yych <= '\'') {
- if (yych <= '#') goto yy171;
- if (yych >= '\'') goto yy175;
- } else {
- if (yych == '\\') goto yy179;
- }
- }
-yy177:
- YYDEBUG(177, *YYCURSOR);
- YYMARKER = ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(178, *YYCURSOR);
- if (yych <= '"') {
- if (yych <= '\t') {
- if (yych <= 0x00) goto yy143;
- goto yy177;
- } else {
- if (yych <= '\n') goto yy143;
- if (yych <= '!') goto yy177;
- goto yy176;
- }
- } else {
- if (yych <= '\'') {
- if (yych <= '#') goto yy171;
- if (yych <= '&') goto yy177;
- goto yy175;
- } else {
- if (yych != '\\') goto yy177;
- }
- }
-yy179:
- YYDEBUG(179, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(180, *YYCURSOR);
- if (yych <= '\n') {
- if (yych <= 0x00) goto yy143;
- if (yych <= '\t') goto yy177;
- goto yy143;
- } else {
- if (yych == '\\') goto yy179;
- goto yy177;
- }
- }
-/* *********************************** */
-yyc_INITIAL:
- {
- static const unsigned char yybm[] = {
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 128, 0, 0, 0, 128, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 128, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
- YYDEBUG(181, *YYCURSOR);
- YYFILL(4);
- yych = *YYCURSOR;
- if (yych <= 'E') {
- if (yych <= '\r') {
- if (yych == '\t') goto yy185;
- if (yych >= '\r') goto yy185;
- } else {
- if (yych == ' ') goto yy186;
- if (yych >= 'E') goto yy189;
- }
- } else {
- if (yych <= 'd') {
- if (yych <= 'Q') goto yy183;
- if (yych <= 'R') goto yy190;
- if (yych <= 'S') goto yy191;
- } else {
- if (yych <= 'q') {
- if (yych <= 'e') goto yy189;
- } else {
- if (yych <= 'r') goto yy192;
- if (yych <= 's') goto yy191;
- }
- }
- }
-yy183:
- YYDEBUG(183, *YYCURSOR);
- ++YYCURSOR;
-yy184:
- YYDEBUG(184, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 206 "sapi/phpdbg/phpdbg_lexer.l"
- {
- YYSETCONDITION(NORMAL);
-
- YYCURSOR = LEX(text);
- goto restart;
-}
-#line 1913 "sapi/phpdbg/phpdbg_lexer.c"
-yy185:
- YYDEBUG(185, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yybm[0+yych] & 128) {
- goto yy186;
- }
- goto yy184;
-yy186:
- YYDEBUG(186, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(187, *YYCURSOR);
- if (yybm[0+yych] & 128) {
- goto yy186;
- }
- YYDEBUG(188, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 175 "sapi/phpdbg/phpdbg_lexer.l"
- {
- /* ignore whitespace */
-
- goto restart;
-}
-#line 1938 "sapi/phpdbg/phpdbg_lexer.c"
-yy189:
- YYDEBUG(189, *YYCURSOR);
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'V') goto yy193;
- if (yych == 'v') goto yy193;
- goto yy184;
-yy190:
- YYDEBUG(190, *YYCURSOR);
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'U') goto yy195;
- if (yych == 'u') goto yy195;
- goto yy184;
-yy191:
- YYDEBUG(191, *YYCURSOR);
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych == 'H') goto yy196;
- if (yych == 'h') goto yy196;
- goto yy184;
-yy192:
- YYDEBUG(192, *YYCURSOR);
- yych = *(YYMARKER = ++YYCURSOR);
- if (yych <= 0x1F) {
- if (yych <= '\t') {
- if (yych <= 0x08) goto yy184;
- goto yy197;
- } else {
- if (yych == '\r') goto yy197;
- goto yy184;
- }
- } else {
- if (yych <= 'U') {
- if (yych <= ' ') goto yy197;
- if (yych <= 'T') goto yy184;
- goto yy195;
- } else {
- if (yych == 'u') goto yy195;
- goto yy184;
- }
- }
-yy193:
- YYDEBUG(193, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych == '\t') goto yy200;
- } else {
- if (yych <= '\r') goto yy200;
- if (yych == ' ') goto yy200;
- }
-yy194:
- YYDEBUG(194, *YYCURSOR);
- YYCURSOR = YYMARKER;
- goto yy184;
-yy195:
- YYDEBUG(195, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych == 'N') goto yy203;
- if (yych == 'n') goto yy203;
- goto yy194;
-yy196:
- YYDEBUG(196, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych == '\t') goto yy204;
- goto yy194;
- } else {
- if (yych <= '\r') goto yy204;
- if (yych == ' ') goto yy204;
- goto yy194;
- }
-yy197:
- YYDEBUG(197, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(198, *YYCURSOR);
- if (yych <= '\f') {
- if (yych == '\t') goto yy197;
- } else {
- if (yych <= '\r') goto yy197;
- if (yych == ' ') goto yy197;
- }
- YYDEBUG(199, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 193 "sapi/phpdbg/phpdbg_lexer.l"
- {
- YYSETCONDITION(PRE_RAW);
- phpdbg_init_param(yylval, EMPTY_PARAM);
- return T_RUN;
-}
-#line 2028 "sapi/phpdbg/phpdbg_lexer.c"
-yy200:
- YYDEBUG(200, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(201, *YYCURSOR);
- if (yych <= '\f') {
- if (yych == '\t') goto yy200;
- } else {
- if (yych <= '\r') goto yy200;
- if (yych == ' ') goto yy200;
- }
- YYDEBUG(202, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 181 "sapi/phpdbg/phpdbg_lexer.l"
- {
- YYSETCONDITION(PRE_RAW);
- phpdbg_init_param(yylval, EMPTY_PARAM);
- return T_EVAL;
-}
-#line 2049 "sapi/phpdbg/phpdbg_lexer.c"
-yy203:
- YYDEBUG(203, *YYCURSOR);
- yych = *++YYCURSOR;
- if (yych <= '\f') {
- if (yych == '\t') goto yy197;
- goto yy194;
- } else {
- if (yych <= '\r') goto yy197;
- if (yych == ' ') goto yy197;
- goto yy194;
- }
-yy204:
- YYDEBUG(204, *YYCURSOR);
- ++YYCURSOR;
- YYFILL(1);
- yych = *YYCURSOR;
- YYDEBUG(205, *YYCURSOR);
- if (yych <= '\f') {
- if (yych == '\t') goto yy204;
- } else {
- if (yych <= '\r') goto yy204;
- if (yych == ' ') goto yy204;
- }
- YYDEBUG(206, *YYCURSOR);
- yyleng = (size_t) YYCURSOR - (size_t) yytext;
-#line 187 "sapi/phpdbg/phpdbg_lexer.l"
- {
- YYSETCONDITION(PRE_RAW);
- phpdbg_init_param(yylval, EMPTY_PARAM);
- return T_SHELL;
-}
-#line 2081 "sapi/phpdbg/phpdbg_lexer.c"
- }
-}
-#line 213 "sapi/phpdbg/phpdbg_lexer.l"
-
-}
diff --git a/sapi/phpdbg/phpdbg_lexer.h b/sapi/phpdbg/phpdbg_lexer.h
index 90f9963b3c..e1cc55ccf3 100644
--- a/sapi/phpdbg/phpdbg_lexer.h
+++ b/sapi/phpdbg/phpdbg_lexer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index cb0250e9e0..d55e76e7b4 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_list.h b/sapi/phpdbg/phpdbg_list.h
index 474bfdf4f5..68cbee8c16 100644
--- a/sapi/phpdbg/phpdbg_list.h
+++ b/sapi/phpdbg/phpdbg_list.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c
index b14a1c23e2..2d6bcd4f78 100644
--- a/sapi/phpdbg/phpdbg_opcode.c
+++ b/sapi/phpdbg/phpdbg_opcode.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_opcode.h b/sapi/phpdbg/phpdbg_opcode.h
index 1bb861ed6f..f84862fbae 100644
--- a/sapi/phpdbg/phpdbg_opcode.h
+++ b/sapi/phpdbg/phpdbg_opcode.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_out.c b/sapi/phpdbg/phpdbg_out.c
index 545e1c951d..95316e77c7 100644
--- a/sapi/phpdbg/phpdbg_out.c
+++ b/sapi/phpdbg/phpdbg_out.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_out.h b/sapi/phpdbg/phpdbg_out.h
index da5cb0c4f8..c6d05bf114 100644
--- a/sapi/phpdbg/phpdbg_out.h
+++ b/sapi/phpdbg/phpdbg_out.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_parser.c b/sapi/phpdbg/phpdbg_parser.c
deleted file mode 100644
index ae7533abe4..0000000000
--- a/sapi/phpdbg/phpdbg_parser.c
+++ /dev/null
@@ -1,1953 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
-
-/* Bison implementation for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-/* C LALR(1) parser skeleton written by Richard Stallman, by
- simplifying the original so-called "semantic" parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.7.12-4996"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 1
-
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
-
-/* Substitute the variable and function names. */
-#define yyparse phpdbg_parse
-#define yylex phpdbg_lex
-#define yyerror phpdbg_error
-#define yylval phpdbg_lval
-#define yychar phpdbg_char
-#define yydebug phpdbg_debug
-#define yynerrs phpdbg_nerrs
-
-/* Copy the first part of user declarations. */
-/* Line 371 of yacc.c */
-#line 1 "sapi/phpdbg/phpdbg_parser.y"
-
-
-/*
- * phpdbg_parser.y
- * (from php-src root)
- */
-
-#include "phpdbg.h"
-#include "phpdbg_cmd.h"
-#include "phpdbg_utils.h"
-#include "phpdbg_cmd.h"
-#include "phpdbg_prompt.h"
-
-#define YYSTYPE phpdbg_param_t
-
-#include "phpdbg_parser.h"
-#include "phpdbg_lexer.h"
-
-#undef yyerror
-static int yyerror(const char *msg);
-
-ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
-
-#ifdef _MSC_VER
-#define YYMALLOC malloc
-#define YYFREE free
-#endif
-
-
-/* Line 371 of yacc.c */
-#line 107 "sapi/phpdbg/phpdbg_parser.c"
-
-# ifndef YY_NULL
-# if defined __cplusplus && 201103L <= __cplusplus
-# define YY_NULL nullptr
-# else
-# define YY_NULL 0
-# endif
-# endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 1
-#endif
-
-/* In a future release of Bison, this section will be replaced
- by #include "phpdbg_parser.h". */
-#ifndef YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
-# define YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int phpdbg_debug;
-#endif
-/* "%code requires" blocks. */
-/* Line 387 of yacc.c */
-#line 36 "sapi/phpdbg/phpdbg_parser.y"
-
-#include "phpdbg.h"
-#ifndef YY_TYPEDEF_YY_SCANNER_T
-#define YY_TYPEDEF_YY_SCANNER_T
-typedef void* yyscan_t;
-#endif
-
-
-/* Line 387 of yacc.c */
-#line 148 "sapi/phpdbg/phpdbg_parser.c"
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- T_EVAL = 258,
- T_RUN = 259,
- T_SHELL = 260,
- T_IF = 261,
- T_TRUTHY = 262,
- T_FALSY = 263,
- T_STRING = 264,
- T_COLON = 265,
- T_DCOLON = 266,
- T_POUND = 267,
- T_SEPARATOR = 268,
- T_PROTO = 269,
- T_DIGITS = 270,
- T_LITERAL = 271,
- T_ADDR = 272,
- T_OPCODE = 273,
- T_ID = 274,
- T_INPUT = 275,
- T_UNEXPECTED = 276,
- T_REQ_ID = 277
- };
-#endif
-/* Tokens. */
-#define T_EVAL 258
-#define T_RUN 259
-#define T_SHELL 260
-#define T_IF 261
-#define T_TRUTHY 262
-#define T_FALSY 263
-#define T_STRING 264
-#define T_COLON 265
-#define T_DCOLON 266
-#define T_POUND 267
-#define T_SEPARATOR 268
-#define T_PROTO 269
-#define T_DIGITS 270
-#define T_LITERAL 271
-#define T_ADDR 272
-#define T_OPCODE 273
-#define T_ID 274
-#define T_INPUT 275
-#define T_UNEXPECTED 276
-#define T_REQ_ID 277
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int phpdbg_parse (void *YYPARSE_PARAM);
-#else
-int phpdbg_parse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int phpdbg_parse (void);
-#else
-int phpdbg_parse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED */
-
-/* Copy the second part of user declarations. */
-
-/* Line 390 of yacc.c */
-#line 229 "sapi/phpdbg/phpdbg_parser.c"
-
-#ifdef short
-# undef short
-#endif
-
-#ifdef YYTYPE_UINT8
-typedef YYTYPE_UINT8 yytype_uint8;
-#else
-typedef unsigned char yytype_uint8;
-#endif
-
-#ifdef YYTYPE_INT8
-typedef YYTYPE_INT8 yytype_int8;
-#elif (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-typedef signed char yytype_int8;
-#else
-typedef short int yytype_int8;
-#endif
-
-#ifdef YYTYPE_UINT16
-typedef YYTYPE_UINT16 yytype_uint16;
-#else
-typedef unsigned short int yytype_uint16;
-#endif
-
-#ifdef YYTYPE_INT16
-typedef YYTYPE_INT16 yytype_int16;
-#else
-typedef short int yytype_int16;
-#endif
-
-#ifndef YYSIZE_T
-# ifdef __SIZE_TYPE__
-# define YYSIZE_T __SIZE_TYPE__
-# elif defined size_t
-# define YYSIZE_T size_t
-# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# else
-# define YYSIZE_T unsigned int
-# endif
-#endif
-
-#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
-
-#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(Msgid) Msgid
-# endif
-#endif
-
-#ifndef __attribute__
-/* This feature is available in gcc versions 2.5 and later. */
-# if (! defined __GNUC__ || __GNUC__ < 2 \
- || (__GNUC__ == 2 && __GNUC_MINOR__ < 5))
-# define __attribute__(Spec) /* empty */
-# endif
-#endif
-
-/* Suppress unused-variable warnings by "using" E. */
-#if ! defined lint || defined __GNUC__
-# define YYUSE(E) ((void) (E))
-#else
-# define YYUSE(E) /* empty */
-#endif
-
-
-/* Identity function, used to suppress warnings about constant conditions. */
-#ifndef lint
-# define YYID(N) (N)
-#else
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static int
-YYID (int yyi)
-#else
-static int
-YYID (yyi)
- int yyi;
-#endif
-{
- return yyi;
-}
-#endif
-
-#if ! defined yyoverflow || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# elif defined __BUILTIN_VA_ARG_INCR
-# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
-# elif defined _AIX
-# define YYSTACK_ALLOC __alloca
-# elif defined _MSC_VER
-# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
-# define alloca _alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
- /* Use EXIT_SUCCESS as a witness for stdlib.h. */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
-# endif
-# if (defined __cplusplus && ! defined EXIT_SUCCESS \
- && ! ((defined YYMALLOC || defined malloc) \
- && (defined YYFREE || defined free)))
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# ifndef EXIT_SUCCESS
-# define EXIT_SUCCESS 0
-# endif
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# endif
-#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-
-
-#if (! defined yyoverflow \
- && (! defined __cplusplus \
- || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-# define YYCOPY_NEEDED 1
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (YYID (0))
-
-#endif
-
-#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
-/* Copy COUNT objects from SRC to DST. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined __GNUC__ && 1 < __GNUC__
-# define YYCOPY(Dst, Src, Count) \
- __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
-# else
-# define YYCOPY(Dst, Src, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (Dst)[yyi] = (Src)[yyi]; \
- } \
- while (YYID (0))
-# endif
-# endif
-#endif /* !YYCOPY_NEEDED */
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 27
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 50
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 23
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 7
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 30
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 46
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 277
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const yytype_uint8 yytranslate[] =
-{
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const yytype_uint8 yyprhs[] =
-{
- 0, 0, 3, 5, 9, 10, 12, 14, 16, 19,
- 22, 26, 31, 36, 42, 46, 52, 56, 59, 61,
- 63, 65, 67, 69, 71, 73, 75, 76, 80, 84,
- 87
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yytype_int8 yyrhs[] =
-{
- 24, 0, -1, 25, -1, 24, 13, 25, -1, -1,
- 26, -1, 29, -1, 27, -1, 26, 27, -1, 26,
- 28, -1, 19, 10, 15, -1, 19, 10, 12, 15,
- -1, 14, 19, 10, 15, -1, 14, 19, 10, 12,
- 15, -1, 19, 11, 19, -1, 19, 11, 19, 12,
- 15, -1, 19, 12, 15, -1, 6, 20, -1, 18,
- -1, 17, -1, 16, -1, 7, -1, 8, -1, 15,
- -1, 19, -1, 22, -1, -1, 3, 28, 20, -1,
- 5, 28, 20, -1, 4, 28, -1, 4, 28, 20,
- -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const yytype_uint8 yyrline[] =
-{
- 0, 71, 71, 72, 73, 77, 78, 82, 83, 84,
- 88, 93, 98, 108, 118, 123, 129, 135, 140, 141,
- 142, 143, 144, 145, 146, 150, 151, 155, 160, 165,
- 169
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || 1
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "\"eval\"", "\"run\"", "\"shell\"",
- "\"if (condition)\"", "\"truthy (true, on, yes or enabled)\"",
- "\"falsy (false, off, no or disabled)\"",
- "\"string (some input, perhaps)\"", "\": (colon)\"",
- "\":: (double colon)\"", "\"# (pound sign followed by digits)\"",
- "\"# (pound sign)\"", "\"protocol (file://)\"", "\"digits (numbers)\"",
- "\"literal (string)\"", "\"address\"", "\"opcode\"",
- "\"identifier (command or function name)\"",
- "\"input (input string or data)\"", "\"input\"",
- "\"request id (-r %d)\"", "$accept", "input", "command", "parameters",
- "parameter", "req_id", "full_expression", YY_NULL
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const yytype_uint16 yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const yytype_uint8 yyr1[] =
-{
- 0, 23, 24, 24, 24, 25, 25, 26, 26, 26,
- 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
- 27, 27, 27, 27, 27, 28, 28, 29, 29, 29,
- 29
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const yytype_uint8 yyr2[] =
-{
- 0, 2, 1, 3, 0, 1, 1, 1, 2, 2,
- 3, 4, 4, 5, 3, 5, 3, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 0, 3, 3, 2,
- 3
-};
-
-/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
- Performed when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const yytype_uint8 yydefact[] =
-{
- 4, 26, 26, 26, 0, 21, 22, 0, 23, 20,
- 19, 18, 24, 0, 2, 5, 7, 6, 25, 0,
- 29, 0, 17, 0, 0, 0, 0, 1, 0, 8,
- 9, 27, 30, 28, 0, 0, 10, 14, 16, 3,
- 0, 12, 11, 0, 13, 15
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yytype_int8 yydefgoto[] =
-{
- -1, 13, 14, 15, 16, 19, 17
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -17
-static const yytype_int8 yypact[] =
-{
- -3, -16, -16, -16, -10, -17, -17, 2, -17, -17,
- -17, -17, 26, 9, -17, 11, -17, -17, -17, 3,
- 4, 21, -17, 29, 19, 23, 25, -17, -3, -17,
- -17, -17, -17, -17, 20, 28, -17, 32, -17, -17,
- 30, -17, -17, 31, -17, -17
-};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yytype_int8 yypgoto[] =
-{
- -17, -17, 22, -17, 33, 5, -17
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -1
-static const yytype_uint8 yytable[] =
-{
- 1, 2, 3, 4, 5, 6, 18, 20, 21, 27,
- 22, 7, 8, 9, 10, 11, 12, 4, 5, 6,
- 30, 23, 28, 31, 32, 7, 8, 9, 10, 11,
- 12, 35, 40, 18, 36, 41, 24, 25, 26, 34,
- 38, 33, 37, 42, 43, 44, 45, 0, 29, 0,
- 39
-};
-
-#define yypact_value_is_default(Yystate) \
- (!!((Yystate) == (-17)))
-
-#define yytable_value_is_error(Yytable_value) \
- YYID (0)
-
-static const yytype_int8 yycheck[] =
-{
- 3, 4, 5, 6, 7, 8, 22, 2, 3, 0,
- 20, 14, 15, 16, 17, 18, 19, 6, 7, 8,
- 15, 19, 13, 20, 20, 14, 15, 16, 17, 18,
- 19, 12, 12, 22, 15, 15, 10, 11, 12, 10,
- 15, 20, 19, 15, 12, 15, 15, -1, 15, -1,
- 28
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const yytype_uint8 yystos[] =
-{
- 0, 3, 4, 5, 6, 7, 8, 14, 15, 16,
- 17, 18, 19, 24, 25, 26, 27, 29, 22, 28,
- 28, 28, 20, 19, 10, 11, 12, 0, 13, 27,
- 28, 20, 20, 20, 10, 12, 15, 19, 15, 25,
- 12, 15, 15, 12, 15, 15
-};
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
-
-#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- YYPOPSTACK (yylen); \
- yystate = *yyssp; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (YYID (0))
-
-/* Error token number */
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* This macro is provided for backward compatibility. */
-#ifndef YY_LOCATION_PRINT
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, YYLEX_PARAM)
-#else
-# define YYLEX yylex (&yylval)
-#endif
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (YYID (0))
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yy_symbol_print (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (YYID (0))
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_value_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- FILE *yyo = yyoutput;
- YYUSE (yyo);
- if (!yyvaluep)
- return;
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# else
- YYUSE (yyoutput);
-# endif
- YYUSE (yytype);
-}
-
-
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
-#else
-static void
-yy_symbol_print (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE const * const yyvaluep;
-#endif
-{
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
- yy_symbol_value_print (yyoutput, yytype, yyvaluep);
- YYFPRINTF (yyoutput, ")");
-}
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
-#else
-static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
-#endif
-{
- YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (YYID (0))
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
-#else
-static void
-yy_reduce_print (yyvsp, yyrule)
- YYSTYPE *yyvsp;
- int yyrule;
-#endif
-{
- int yynrhs = yyr2[yyrule];
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
- yyrule - 1, yylno);
- /* The symbols being reduced. */
- for (yyi = 0; yyi < yynrhs; yyi++)
- {
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
- yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
- &(yyvsp[(yyi + 1) - (yynrhs)])
- );
- YYFPRINTF (stderr, "\n");
- }
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (yyvsp, Rule); \
-} while (YYID (0))
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined __GLIBC__ && defined _STRING_H
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static YYSIZE_T
-yystrlen (const char *yystr)
-#else
-static YYSIZE_T
-yystrlen (yystr)
- const char *yystr;
-#endif
-{
- YYSIZE_T yylen;
- for (yylen = 0; yystr[yylen]; yylen++)
- continue;
- return yylen;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static char *
-yystpcpy (char *yydest, const char *yysrc)
-#else
-static char *
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-#endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- YYSIZE_T yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
- about the unexpected token YYTOKEN for the state stack whose top is
- YYSSP.
-
- Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
- not large enough to hold the message. In that case, also set
- *YYMSG_ALLOC to the required number of bytes. Return 2 if the
- required number of bytes is too large to store. */
-static int
-yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
- yytype_int16 *yyssp, int yytoken)
-{
- YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
- YYSIZE_T yysize = yysize0;
- enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
- /* Internationalized format string. */
- const char *yyformat = YY_NULL;
- /* Arguments of yyformat. */
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- /* Number of reported tokens (one for the "unexpected", one per
- "expected"). */
- int yycount = 0;
-
- /* There are many possibilities here to consider:
- - Assume YYFAIL is not used. It's too flawed to consider. See
- <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
- for details. YYERROR is fine as it does not invoke this
- function.
- - If this state is a consistent state with a default action, then
- the only way this function was invoked is if the default action
- is an error action. In that case, don't check for expected
- tokens because there are none.
- - The only way there can be no lookahead present (in yychar) is if
- this state is a consistent state with a default action. Thus,
- detecting the absence of a lookahead is sufficient to determine
- that there is no unexpected or expected token to report. In that
- case, just report a simple "syntax error".
- - Don't assume there isn't a lookahead just because this state is a
- consistent state with a default action. There might have been a
- previous inconsistent state, consistent state with a non-default
- action, or user semantic action that manipulated yychar.
- - Of course, the expected token list depends on states to have
- correct lookahead information, and it depends on the parser not
- to perform extra reductions after fetching a lookahead from the
- scanner and before detecting a syntax error. Thus, state merging
- (from LALR or IELR) and default reductions corrupt the expected
- token list. However, the list is correct for canonical LR with
- one exception: it will still contain any token that will not be
- accepted due to an error action in a later state.
- */
- if (yytoken != YYEMPTY)
- {
- int yyn = yypact[*yyssp];
- yyarg[yycount++] = yytname[yytoken];
- if (!yypact_value_is_default (yyn))
- {
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. In other words, skip the first -YYN actions for
- this state because they are default actions. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn + 1;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yyx;
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
- && !yytable_value_is_error (yytable[yyx + yyn]))
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- {
- YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
- }
- }
- }
-
- switch (yycount)
- {
-# define YYCASE_(N, S) \
- case N: \
- yyformat = S; \
- break
- YYCASE_(0, YY_("syntax error"));
- YYCASE_(1, YY_("syntax error, unexpected %s"));
- YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
- YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
- YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
- YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
-# undef YYCASE_
- }
-
- {
- YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
- }
-
- if (*yymsg_alloc < yysize)
- {
- *yymsg_alloc = 2 * yysize;
- if (! (yysize <= *yymsg_alloc
- && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
- *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
- return 1;
- }
-
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- {
- char *yyp = *yymsg;
- int yyi = 0;
- while ((*yyp = *yyformat) != '\0')
- if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyformat += 2;
- }
- else
- {
- yyp++;
- yyformat++;
- }
- }
- return 0;
-}
-#endif /* YYERROR_VERBOSE */
-
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-/*ARGSUSED*/
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
-{
- YYUSE (yyvaluep);
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- YYUSE (yytype);
-}
-
-
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void *YYPARSE_PARAM)
-#else
-int
-yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-#endif
-#else /* ! YYPARSE_PARAM */
-#if (defined __STDC__ || defined __C99__FUNC__ \
- || defined __cplusplus || defined _MSC_VER)
-int
-yyparse (void)
-#else
-int
-yyparse ()
-
-#endif
-#endif
-{
-/* The lookahead symbol. */
-int yychar;
-
-
-#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
-/* Suppress an incorrect diagnostic about yylval being uninitialized. */
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
- _Pragma ("GCC diagnostic push") \
- _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
- _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
- _Pragma ("GCC diagnostic pop")
-#else
-/* Default value used for initialization, for pacifying older GCCs
- or non-GCC compilers. */
-static YYSTYPE yyval_default;
-# define YY_INITIAL_VALUE(Value) = Value
-#endif
-#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
-# define YY_IGNORE_MAYBE_UNINITIALIZED_END
-#endif
-#ifndef YY_INITIAL_VALUE
-# define YY_INITIAL_VALUE(Value) /* Nothing. */
-#endif
-
-/* The semantic value of the lookahead symbol. */
-YYSTYPE yylval YY_INITIAL_VALUE(yyval_default);
-
- /* Number of syntax errors so far. */
- int yynerrs;
-
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks through separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
-
- int yyn;
- int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken = 0;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-#if YYERROR_VERBOSE
- /* Buffer for error messages, and its allocated size. */
- char yymsgbuf[128];
- char *yymsg = yymsgbuf;
- YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
-#endif
-
-#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
-
- /* The number of symbols on the RHS of the reduced rule.
- Keep to zero when no symbol should be popped. */
- int yylen = 0;
-
- yyssp = yyss = yyssa;
- yyvsp = yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. So pushing a state here evens the stacks. */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
- {
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- yytype_int16 *yyss1 = yyss;
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- yytype_int16 *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- if (yystate == YYFINAL)
- YYACCEPT;
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
- /* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
-
- /* First try to decide what to do without reference to lookahead token. */
- yyn = yypact[yystate];
- if (yypact_value_is_default (yyn))
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
-
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yytable_value_is_error (yyn))
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- /* Shift the lookahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the shifted token. */
- yychar = YYEMPTY;
-
- yystate = yyn;
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
-
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 2:
-/* Line 1802 of yacc.c */
-#line 71 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 3:
-/* Line 1802 of yacc.c */
-#line 72 "sapi/phpdbg/phpdbg_parser.y"
- { phpdbg_stack_separate((yyvsp[(1) - (3)]).top); (yyval) = (yyvsp[(3) - (3)]); }
- break;
-
- case 5:
-/* Line 1802 of yacc.c */
-#line 77 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval).top = PHPDBG_G(parser_stack)->top; }
- break;
-
- case 6:
-/* Line 1802 of yacc.c */
-#line 78 "sapi/phpdbg/phpdbg_parser.y"
- { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); (yyval).top = PHPDBG_G(parser_stack)->top; }
- break;
-
- case 7:
-/* Line 1802 of yacc.c */
-#line 82 "sapi/phpdbg/phpdbg_parser.y"
- { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(1) - (1)])); (yyval).top = PHPDBG_G(parser_stack)->top; }
- break;
-
- case 8:
-/* Line 1802 of yacc.c */
-#line 83 "sapi/phpdbg/phpdbg_parser.y"
- { phpdbg_stack_push(PHPDBG_G(parser_stack), &(yyvsp[(2) - (2)])); (yyval).top = PHPDBG_G(parser_stack)->top; }
- break;
-
- case 9:
-/* Line 1802 of yacc.c */
-#line 84 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (2)]); }
- break;
-
- case 10:
-/* Line 1802 of yacc.c */
-#line 88 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = FILE_PARAM;
- (yyval).file.name = (yyvsp[(2) - (3)]).str;
- (yyval).file.line = (yyvsp[(3) - (3)]).num;
- }
- break;
-
- case 11:
-/* Line 1802 of yacc.c */
-#line 93 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = NUMERIC_FILE_PARAM;
- (yyval).file.name = (yyvsp[(1) - (4)]).str;
- (yyval).file.line = (yyvsp[(4) - (4)]).num;
- }
- break;
-
- case 12:
-/* Line 1802 of yacc.c */
-#line 98 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = FILE_PARAM;
- (yyval).file.name = malloc((yyvsp[(1) - (4)]).len + (yyvsp[(2) - (4)]).len + 1);
- if ((yyval).file.name) {
- memcpy(&(yyval).file.name[0], (yyvsp[(1) - (4)]).str, (yyvsp[(1) - (4)]).len);
- memcpy(&(yyval).file.name[(yyvsp[(1) - (4)]).len], (yyvsp[(2) - (4)]).str, (yyvsp[(2) - (4)]).len);
- (yyval).file.name[(yyvsp[(1) - (4)]).len + (yyvsp[(2) - (4)]).len] = '\0';
- }
- (yyval).file.line = (yyvsp[(4) - (4)]).num;
- }
- break;
-
- case 13:
-/* Line 1802 of yacc.c */
-#line 108 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = NUMERIC_FILE_PARAM;
- (yyval).file.name = malloc((yyvsp[(1) - (5)]).len + (yyvsp[(2) - (5)]).len + 1);
- if ((yyval).file.name) {
- memcpy(&(yyval).file.name[0], (yyvsp[(1) - (5)]).str, (yyvsp[(1) - (5)]).len);
- memcpy(&(yyval).file.name[(yyvsp[(1) - (5)]).len], (yyvsp[(2) - (5)]).str, (yyvsp[(2) - (5)]).len);
- (yyval).file.name[(yyvsp[(1) - (5)]).len + (yyvsp[(2) - (5)]).len] = '\0';
- }
- (yyval).file.line = (yyvsp[(5) - (5)]).num;
- }
- break;
-
- case 14:
-/* Line 1802 of yacc.c */
-#line 118 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = METHOD_PARAM;
- (yyval).method.class = (yyvsp[(1) - (3)]).str;
- (yyval).method.name = (yyvsp[(3) - (3)]).str;
- }
- break;
-
- case 15:
-/* Line 1802 of yacc.c */
-#line 123 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = NUMERIC_METHOD_PARAM;
- (yyval).method.class = (yyvsp[(1) - (5)]).str;
- (yyval).method.name = (yyvsp[(3) - (5)]).str;
- (yyval).num = (yyvsp[(5) - (5)]).num;
- }
- break;
-
- case 16:
-/* Line 1802 of yacc.c */
-#line 129 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = NUMERIC_FUNCTION_PARAM;
- (yyval).str = (yyvsp[(1) - (3)]).str;
- (yyval).len = (yyvsp[(1) - (3)]).len;
- (yyval).num = (yyvsp[(3) - (3)]).num;
- }
- break;
-
- case 17:
-/* Line 1802 of yacc.c */
-#line 135 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = COND_PARAM;
- (yyval).str = (yyvsp[(2) - (2)]).str;
- (yyval).len = (yyvsp[(2) - (2)]).len;
- }
- break;
-
- case 18:
-/* Line 1802 of yacc.c */
-#line 140 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 19:
-/* Line 1802 of yacc.c */
-#line 141 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 20:
-/* Line 1802 of yacc.c */
-#line 142 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 21:
-/* Line 1802 of yacc.c */
-#line 143 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 22:
-/* Line 1802 of yacc.c */
-#line 144 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 23:
-/* Line 1802 of yacc.c */
-#line 145 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 24:
-/* Line 1802 of yacc.c */
-#line 146 "sapi/phpdbg/phpdbg_parser.y"
- { (yyval) = (yyvsp[(1) - (1)]); }
- break;
-
- case 25:
-/* Line 1802 of yacc.c */
-#line 150 "sapi/phpdbg/phpdbg_parser.y"
- { PHPDBG_G(req_id) = (yyvsp[(1) - (1)]).num; }
- break;
-
- case 27:
-/* Line 1802 of yacc.c */
-#line 155 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = EVAL_PARAM;
- (yyval).str = (yyvsp[(3) - (3)]).str;
- (yyval).len = (yyvsp[(3) - (3)]).len;
- }
- break;
-
- case 28:
-/* Line 1802 of yacc.c */
-#line 160 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = SHELL_PARAM;
- (yyval).str = (yyvsp[(3) - (3)]).str;
- (yyval).len = (yyvsp[(3) - (3)]).len;
- }
- break;
-
- case 29:
-/* Line 1802 of yacc.c */
-#line 165 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = RUN_PARAM;
- (yyval).len = 0;
- }
- break;
-
- case 30:
-/* Line 1802 of yacc.c */
-#line 169 "sapi/phpdbg/phpdbg_parser.y"
- {
- (yyval).type = RUN_PARAM;
- (yyval).str = (yyvsp[(3) - (3)]).str;
- (yyval).len = (yyvsp[(3) - (3)]).len;
- }
- break;
-
-
-/* Line 1802 of yacc.c */
-#line 1694 "sapi/phpdbg/phpdbg_parser.c"
- default: break;
- }
- /* User semantic actions sometimes alter yychar, and that requires
- that yytoken be updated with the new translation. We take the
- approach of translating immediately before every use of yytoken.
- One alternative is translating here after every semantic action,
- but that translation would be missed if the semantic action invokes
- YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
- if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
- incorrect destructor might then be invoked immediately. In the
- case of YYERROR or YYBACKUP, subsequent parser actions might lead
- to an incorrect destructor call or verbose syntax error message
- before the lookahead is translated. */
- YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
-
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
- /* Now `shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
-
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if ! YYERROR_VERBOSE
- yyerror (YY_("syntax error"));
-#else
-# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
- yyssp, yytoken)
- {
- char const *yymsgp = YY_("syntax error");
- int yysyntax_error_status;
- yysyntax_error_status = YYSYNTAX_ERROR;
- if (yysyntax_error_status == 0)
- yymsgp = yymsg;
- else if (yysyntax_error_status == 1)
- {
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
- yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
- if (!yymsg)
- {
- yymsg = yymsgbuf;
- yymsg_alloc = sizeof yymsgbuf;
- yysyntax_error_status = 2;
- }
- else
- {
- yysyntax_error_status = YYSYNTAX_ERROR;
- yymsgp = yymsg;
- }
- }
- yyerror (yymsgp);
- if (yysyntax_error_status == 2)
- goto yyexhaustedlab;
- }
-# undef YYSYNTAX_ERROR
-#endif
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse lookahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding",
- yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse lookahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (/*CONSTCOND*/ 0)
- goto yyerrorlab;
-
- /* Do not reclaim the symbols of the rule which action triggered
- this YYERROR. */
- YYPOPSTACK (yylen);
- yylen = 0;
- YY_STACK_PRINT (yyss, yyssp);
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (!yypact_value_is_default (yyn))
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping",
- yystos[yystate], yyvsp);
- YYPOPSTACK (1);
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
- *++yyvsp = yylval;
- YY_IGNORE_MAYBE_UNINITIALIZED_END
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#if !defined yyoverflow || YYERROR_VERBOSE
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
-#endif
-
-yyreturn:
- if (yychar != YYEMPTY)
- {
- /* Make sure we have latest lookahead translation. See comments at
- user semantic actions for why this is necessary. */
- yytoken = YYTRANSLATE (yychar);
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- }
- /* Do not reclaim the symbols of the rule which action triggered
- this YYABORT or YYACCEPT. */
- YYPOPSTACK (yylen);
- YY_STACK_PRINT (yyss, yyssp);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK (1);
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
-#if YYERROR_VERBOSE
- if (yymsg != yymsgbuf)
- YYSTACK_FREE (yymsg);
-#endif
- /* Make sure YYID is used. */
- return YYID (yyresult);
-}
-
-
-/* Line 2050 of yacc.c */
-#line 176 "sapi/phpdbg/phpdbg_parser.y"
-
-
-static int yyerror(const char *msg) {
- phpdbg_error("command", "type=\"parseerror\" msg=\"%s\"", "Parse Error: %s", msg);
-
- {
- const phpdbg_param_t *top = PHPDBG_G(parser_stack);
-
- while (top) {
- phpdbg_param_debug(top, "--> ");
- top = top->next;
- }
- }
- return 0;
-}
-
-int phpdbg_do_parse(phpdbg_param_t *stack, char *input) {
- if (!*input) {
- return 0;
- }
-
- if (PHPDBG_G(cur_command)) {
- free(PHPDBG_G(cur_command));
- }
- PHPDBG_G(cur_command) = strdup(input);
-
- phpdbg_init_lexer(stack, input);
-
- return yyparse();
-}
diff --git a/sapi/phpdbg/phpdbg_parser.h b/sapi/phpdbg/phpdbg_parser.h
deleted file mode 100644
index 2a27a4e7df..0000000000
--- a/sapi/phpdbg/phpdbg_parser.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.7.12-4996. */
-
-/* Bison interface for Yacc-like parsers in C
-
- Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* As a special exception, you may create a larger work that contains
- part or all of the Bison parser skeleton and distribute that work
- under terms of your choice, so long as that work isn't itself a
- parser generator using the skeleton or a modified version thereof
- as a parser skeleton. Alternatively, if you modify or redistribute
- the parser skeleton itself, you may (at your option) remove this
- special exception, which will cause the skeleton and the resulting
- Bison output files to be licensed under the GNU General Public
- License without this special exception.
-
- This special exception was added by the Free Software Foundation in
- version 2.2 of Bison. */
-
-#ifndef YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
-# define YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG
-extern int phpdbg_debug;
-#endif
-/* "%code requires" blocks. */
-/* Line 2060 of yacc.c */
-#line 36 "sapi/phpdbg/phpdbg_parser.y"
-
-#include "phpdbg.h"
-#ifndef YY_TYPEDEF_YY_SCANNER_T
-#define YY_TYPEDEF_YY_SCANNER_T
-typedef void* yyscan_t;
-#endif
-
-
-/* Line 2060 of yacc.c */
-#line 55 "sapi/phpdbg/phpdbg_parser.h"
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- T_EVAL = 258,
- T_RUN = 259,
- T_SHELL = 260,
- T_IF = 261,
- T_TRUTHY = 262,
- T_FALSY = 263,
- T_STRING = 264,
- T_COLON = 265,
- T_DCOLON = 266,
- T_POUND = 267,
- T_SEPARATOR = 268,
- T_PROTO = 269,
- T_DIGITS = 270,
- T_LITERAL = 271,
- T_ADDR = 272,
- T_OPCODE = 273,
- T_ID = 274,
- T_INPUT = 275,
- T_UNEXPECTED = 276,
- T_REQ_ID = 277
- };
-#endif
-/* Tokens. */
-#define T_EVAL 258
-#define T_RUN 259
-#define T_SHELL 260
-#define T_IF 261
-#define T_TRUTHY 262
-#define T_FALSY 263
-#define T_STRING 264
-#define T_COLON 265
-#define T_DCOLON 266
-#define T_POUND 267
-#define T_SEPARATOR 268
-#define T_PROTO 269
-#define T_DIGITS 270
-#define T_LITERAL 271
-#define T_ADDR 272
-#define T_OPCODE 273
-#define T_ID 274
-#define T_INPUT 275
-#define T_UNEXPECTED 276
-#define T_REQ_ID 277
-
-
-
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef int YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
-
-#ifdef YYPARSE_PARAM
-#if defined __STDC__ || defined __cplusplus
-int phpdbg_parse (void *YYPARSE_PARAM);
-#else
-int phpdbg_parse ();
-#endif
-#else /* ! YYPARSE_PARAM */
-#if defined __STDC__ || defined __cplusplus
-int phpdbg_parse (void);
-#else
-int phpdbg_parse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-#endif /* !YY_PHPDBG_SAPI_PHPDBG_PHPDBG_PARSER_H_INCLUDED */
diff --git a/sapi/phpdbg/phpdbg_parser.y b/sapi/phpdbg/phpdbg_parser.y
index b61c9c0a26..c4f6682fee 100644
--- a/sapi/phpdbg/phpdbg_parser.y
+++ b/sapi/phpdbg/phpdbg_parser.y
@@ -29,7 +29,7 @@ ZEND_EXTERN_MODULE_GLOBALS(phpdbg)
%}
%pure-parser
-%error-verbose
+%define parse.error verbose
%code requires {
#include "phpdbg.h"
@@ -39,9 +39,6 @@ typedef void* yyscan_t;
#endif
}
-%output "sapi/phpdbg/phpdbg_parser.c"
-%defines "sapi/phpdbg/phpdbg_parser.h"
-
%token T_EVAL "eval"
%token T_RUN "run"
%token T_SHELL "shell"
@@ -68,7 +65,7 @@ typedef void* yyscan_t;
input
: command { $$ = $1; }
| input T_SEPARATOR command { phpdbg_stack_separate($1.top); $$ = $3; }
- | /* nothing */
+ | /* empty */
;
command
@@ -79,7 +76,7 @@ command
parameters
: parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$1); $$.top = PHPDBG_G(parser_stack)->top; }
| parameters parameter { phpdbg_stack_push(PHPDBG_G(parser_stack), &$2); $$.top = PHPDBG_G(parser_stack)->top; }
- | parameters req_id { $$ = $1; }
+ | parameters T_REQ_ID { $$ = $1; PHPDBG_G(req_id) = $2.num; }
;
parameter
diff --git a/sapi/phpdbg/phpdbg_print.c b/sapi/phpdbg/phpdbg_print.c
index bc1ac22f26..5f48bd6a59 100644
--- a/sapi/phpdbg/phpdbg_print.c
+++ b/sapi/phpdbg/phpdbg_print.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_print.h b/sapi/phpdbg/phpdbg_print.h
index 1a7d5e87a4..66eae7bceb 100644
--- a/sapi/phpdbg/phpdbg_print.h
+++ b/sapi/phpdbg/phpdbg_print.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index db56476905..c962ce52c3 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -81,7 +81,7 @@ const phpdbg_command_t phpdbg_prompt_commands[] = {
PHPDBG_COMMAND_D(back, "show trace", 't', NULL, "|n", PHPDBG_ASYNC_SAFE),
PHPDBG_COMMAND_D(frame, "switch to a frame", 'f', NULL, "|n", PHPDBG_ASYNC_SAFE),
PHPDBG_COMMAND_D(list, "lists some code", 'l', phpdbg_list_commands, "*", PHPDBG_ASYNC_SAFE),
- PHPDBG_COMMAND_D(info, "displays some informations", 'i', phpdbg_info_commands, "|s", PHPDBG_ASYNC_SAFE),
+ PHPDBG_COMMAND_D(info, "displays some information", 'i', phpdbg_info_commands, "|s", PHPDBG_ASYNC_SAFE),
PHPDBG_COMMAND_D(clean, "clean the execution environment", 'X', NULL, 0, 0),
PHPDBG_COMMAND_D(clear, "clear breakpoints", 'C', NULL, 0, 0),
PHPDBG_COMMAND_D(help, "show help menu", 'h', phpdbg_help_commands, "|s", PHPDBG_ASYNC_SAFE),
@@ -1315,7 +1315,7 @@ PHPDBG_API const char *phpdbg_load_module_or_extension(char **path, char **name)
char *err = GET_DL_ERROR();
if (err && err[0]) {
phpdbg_error("dl", "type=\"unknown\"", "%s", err);
- LocalFree(err);
+ php_win32_error_msg_free(err);
} else {
phpdbg_error("dl", "type=\"unknown\"", "Unknown reason");
}
diff --git a/sapi/phpdbg/phpdbg_prompt.h b/sapi/phpdbg/phpdbg_prompt.h
index cac69c0120..142581783a 100644
--- a/sapi/phpdbg/phpdbg_prompt.h
+++ b/sapi/phpdbg/phpdbg_prompt.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_rinit_hook.c b/sapi/phpdbg/phpdbg_rinit_hook.c
index d923f7c1d2..2bc1c59b90 100644
--- a/sapi/phpdbg/phpdbg_rinit_hook.c
+++ b/sapi/phpdbg/phpdbg_rinit_hook.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_rinit_hook.h b/sapi/phpdbg/phpdbg_rinit_hook.h
index adc3f1c681..a350ddec54 100644
--- a/sapi/phpdbg/phpdbg_rinit_hook.h
+++ b/sapi/phpdbg/phpdbg_rinit_hook.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -27,7 +27,7 @@ extern zend_module_entry phpdbg_webhelper_module_entry;
#define phpext_phpdbg_webhelper_ptr &phpdbg_webhelper_module_entry
#ifdef ZTS
-# define PHPDBG_WG(v) TSRMG(phpdbg_webhelper_globals_id, zend_phpdbg_webhelper_globals *, v)
+# define PHPDBG_WG(v) ZEND_TSRMG(phpdbg_webhelper_globals_id, zend_phpdbg_webhelper_globals *, v)
#else
# define PHPDBG_WG(v) (phpdbg_webhelper_globals.v)
#endif
diff --git a/sapi/phpdbg/phpdbg_set.c b/sapi/phpdbg/phpdbg_set.c
index dc69221a50..da3ec4cf19 100644
--- a/sapi/phpdbg/phpdbg_set.c
+++ b/sapi/phpdbg/phpdbg_set.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_set.h b/sapi/phpdbg/phpdbg_set.h
index c4b0dd9523..7f89d9182d 100644
--- a/sapi/phpdbg/phpdbg_set.h
+++ b/sapi/phpdbg/phpdbg_set.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_sigio_win32.c b/sapi/phpdbg/phpdbg_sigio_win32.c
index 3ca0ad8d37..f3221d09cb 100644
--- a/sapi/phpdbg/phpdbg_sigio_win32.c
+++ b/sapi/phpdbg/phpdbg_sigio_win32.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2014-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_sigio_win32.h b/sapi/phpdbg/phpdbg_sigio_win32.h
index d5d6383a8f..af7b9f10cb 100644
--- a/sapi/phpdbg/phpdbg_sigio_win32.h
+++ b/sapi/phpdbg/phpdbg_sigio_win32.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 2014-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c
index e10eb60d4a..c40349f2a0 100644
--- a/sapi/phpdbg/phpdbg_utils.c
+++ b/sapi/phpdbg/phpdbg_utils.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -660,8 +660,6 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) {
int (*element_dump_func)(zval *zv, zend_string *key, zend_ulong num);
zend_bool is_ref = 0;
- int is_temp;
-
phpdbg_try_access {
is_ref = Z_ISREF_P(zv) && GC_REFCOUNT(Z_COUNTED_P(zv)) > 1;
ZVAL_DEREF(zv);
@@ -696,10 +694,9 @@ PHPDBG_API void phpdbg_xml_var_dump(zval *zv) {
}
phpdbg_xml("<array refstatus=\"%s\" num=\"%d\">", COMMON, zend_hash_num_elements(myht));
element_dump_func = phpdbg_xml_array_element_dump;
- is_temp = 0;
goto head_done;
case IS_OBJECT:
- myht = Z_OBJDEBUG_P(zv, is_temp);
+ myht = zend_get_properties_for(zv, ZEND_PROP_PURPOSE_DEBUG);
if (myht && GC_IS_RECURSIVE(myht)) {
phpdbg_xml("<recursion />");
break;
@@ -717,9 +714,8 @@ head_done:
} ZEND_HASH_FOREACH_END();
zend_hash_apply_with_arguments(myht, (apply_func_args_t) element_dump_func, 0);
GC_UNPROTECT_RECURSION(myht);
- if (is_temp) {
- zend_hash_destroy(myht);
- efree(myht);
+ if (Z_TYPE_P(zv) == IS_OBJECT) {
+ zend_release_properties(myht);
}
}
if (Z_TYPE_P(zv) == IS_ARRAY) {
@@ -765,7 +761,7 @@ PHPDBG_API zend_bool phpdbg_check_caught_ex(zend_execute_data *execute_data, zen
zend_class_entry *ce;
if (!(ce = CACHED_PTR(cur->extended_value & ~ZEND_LAST_CATCH))) {
- ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(cur, cur->op1)), RT_CONSTANT(cur, cur->op1) + 1, ZEND_FETCH_CLASS_NO_AUTOLOAD);
+ ce = zend_fetch_class_by_name(Z_STR_P(RT_CONSTANT(cur, cur->op1)), Z_STR_P(RT_CONSTANT(cur, cur->op1) + 1), ZEND_FETCH_CLASS_NO_AUTOLOAD);
CACHE_PTR(cur->extended_value & ~ZEND_LAST_CATCH, ce);
}
diff --git a/sapi/phpdbg/phpdbg_utils.h b/sapi/phpdbg/phpdbg_utils.h
index c8a9554d0e..c212056670 100644
--- a/sapi/phpdbg/phpdbg_utils.h
+++ b/sapi/phpdbg/phpdbg_utils.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -111,7 +111,7 @@ static zend_always_inline zend_execute_data *phpdbg_user_execute_data(zend_execu
#define PHPDBG_OUTPUT_BACKUP_DEFINES() \
zend_output_globals *output_globals_ptr; \
zend_output_globals original_output_globals; \
- output_globals_ptr = (zend_output_globals *) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(output_globals_id)];
+ output_globals_ptr = TSRMG_BULK_STATIC(output_globals_id, zend_output_globals *);
#else
#define PHPDBG_OUTPUT_BACKUP_DEFINES() \
zend_output_globals *output_globals_ptr; \
diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c
index 96504c7d7e..de0ecbe59f 100644
--- a/sapi/phpdbg/phpdbg_wait.c
+++ b/sapi/phpdbg/phpdbg_wait.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_wait.h b/sapi/phpdbg/phpdbg_wait.h
index 71c6ace543..b748e162bb 100644
--- a/sapi/phpdbg/phpdbg_wait.h
+++ b/sapi/phpdbg/phpdbg_wait.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_watch.c b/sapi/phpdbg/phpdbg_watch.c
index 1d7f33ff6f..35d316b8ea 100644
--- a/sapi/phpdbg/phpdbg_watch.c
+++ b/sapi/phpdbg/phpdbg_watch.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -31,7 +31,7 @@
* Watch elements are either simple, recursive or implicit (PHPDBG_WATCH_* flags)
* Simple means that a particular watchpoint was explicitly defined
* Recursive watch elements are created recursively (recursive root flag is to distinguish the root element easily from its children recursive elements)
- * Implicit watch elements are implicitely created on all ancestors of simple or recursive watch elements
+ * Implicit watch elements are implicitly created on all ancestors of simple or recursive watch elements
* Recursive and (simple or implicit) watch elements are mutually exclusive
* Array/Object to distinguish watch elements on arrays
*
diff --git a/sapi/phpdbg/phpdbg_watch.h b/sapi/phpdbg/phpdbg_watch.h
index 4d5e2153ae..313df624ea 100644
--- a/sapi/phpdbg/phpdbg_watch.h
+++ b/sapi/phpdbg/phpdbg_watch.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_webdata_transfer.c b/sapi/phpdbg/phpdbg_webdata_transfer.c
index a543f98ba7..36d327f56f 100644
--- a/sapi/phpdbg/phpdbg_webdata_transfer.c
+++ b/sapi/phpdbg/phpdbg_webdata_transfer.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_webdata_transfer.h b/sapi/phpdbg/phpdbg_webdata_transfer.h
index aa736a78b9..c08c6e8f93 100644
--- a/sapi/phpdbg/phpdbg_webdata_transfer.h
+++ b/sapi/phpdbg/phpdbg_webdata_transfer.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_win.c b/sapi/phpdbg/phpdbg_win.c
index 964aed0194..6bf79981e0 100644
--- a/sapi/phpdbg/phpdbg_win.c
+++ b/sapi/phpdbg/phpdbg_win.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/phpdbg_win.h b/sapi/phpdbg/phpdbg_win.h
index ee9191b1ad..ba83062301 100644
--- a/sapi/phpdbg/phpdbg_win.h
+++ b/sapi/phpdbg/phpdbg_win.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/sapi/phpdbg/tests/print_001.phpt b/sapi/phpdbg/tests/print_001.phpt
index 93a000528f..0025d5c071 100644
--- a/sapi/phpdbg/tests/print_001.phpt
+++ b/sapi/phpdbg/tests/print_001.phpt
@@ -30,19 +30,17 @@ L5-7 Foo\Bar::Foo() %s - %s + 5 ops
L9-9 Foo\Bar::baz() %s - %s + 1 ops
L9 #0 RETURN<-1> null
prompt> [Not Executing!]
-prompt> [Context %s (11 ops)]
-L1-21 {main}() %s - %s + 11 ops
- L4 #0 NOP
- L14 #1 NOP
- L18 #2 NEW "Foo\\Bar" @1
- L18 #3 DO_FCALL
- L18 #4 INIT_METHOD_CALL<1> @1 "Foo"
- L18 #5 SEND_VAL_EX "test" 1
- L18 #6 DO_FCALL
- L19 #7 INIT_FCALL%s %d %s "foo"
- L19 #8 SEND_VAL "test" 1
- L19 #9 DO_FCALL
- L21 #10 RETURN<-1> 1
+prompt> [Context %s (9 ops)]
+L1-21 {main}() %s - %s + 9 ops
+ L18 #0 NEW "Foo\\Bar" @0
+ L18 #1 DO_FCALL
+ L18 #2 INIT_METHOD_CALL<1> @0 "Foo"
+ L18 #3 SEND_VAL_EX "test" 1
+ L18 #4 DO_FCALL
+ L19 #5 INIT_FCALL%s %d %s "foo"
+ L19 #6 SEND_VAL "test" 1
+ L19 #7 DO_FCALL
+ L21 #8 RETURN<-1> 1
prompt>
--FILE--
<?php
diff --git a/sapi/phpdbg/tests/stepping_001.phpt b/sapi/phpdbg/tests/stepping_001.phpt
index 90b2e5573a..27084c6ef7 100644
--- a/sapi/phpdbg/tests/stepping_001.phpt
+++ b/sapi/phpdbg/tests/stepping_001.phpt
@@ -34,7 +34,7 @@ prompt> [L10 %s ECHO "ok"
00011: } finally {
00012: echo " ... ok";
prompt> ok
-[L11 %s FAST_CALL J8 ~%d %s]
+[L11 %s FAST_CALL J7 ~%d %s]
>00011: } finally {
00012: echo " ... ok";
00013: }
@@ -44,7 +44,7 @@ prompt> [L12 %s ECHO " ... ok"
00014:
prompt> ... ok
[L12 %s FAST_RET ~%d %s]
-[L11 %s JMP J10 %s]
+[L11 %s JMP J9 %s]
>00011: } finally {
00012: echo " ... ok";
00013: }
diff --git a/sapi/phpdbg/web-bootstrap.php b/sapi/phpdbg/web-bootstrap.php
index 046062997e..fa634ee8d7 100644
--- a/sapi/phpdbg/web-bootstrap.php
+++ b/sapi/phpdbg/web-bootstrap.php
@@ -30,7 +30,7 @@ $_SERVER = array
'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.8',
'HTTP_COOKIE' => 'tz=Europe%2FLondon; __utma=1.347100075.1384196523.1384196523.1384196523.1; __utmc=1; __utmz=1.1384196523.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',
'PATH' => '/usr/local/bin:/usr/bin:/bin',
- 'SERVER_SIGNATURE' => '<address>Apache/2.4.6 (Ubuntu) Server at phpdbg.com Port 80</address>',
+ 'SERVER_SIGNATURE' => '<address>Apache/2.4.6 (Ubuntu) Server at localhost Port 80</address>',
'SERVER_SOFTWARE' => 'Apache/2.4.6 (Ubuntu)',
'SERVER_NAME' => 'localhost',
'SERVER_ADDR' => '127.0.0.1',
diff --git a/sapi/phpdbg/xml.md b/sapi/phpdbg/xml.md
index c02f80f2ca..3fff8d2bc1 100644
--- a/sapi/phpdbg/xml.md
+++ b/sapi/phpdbg/xml.md
@@ -633,7 +633,7 @@ Other tags
- &lt;watchhit variable="" />: when ever a watched variable is changed, followed by a &lt;watchdata> container
- &lt;watchdata> may contain
- for watchpoints on variables:
- - each of these &lt;watch*> tags conatins a type attribute whose value is either "old" or "new")
+ - each of these &lt;watch*> tags contains a type attribute whose value is either "old" or "new")
- &lt;watchvalue type="" inaccessible="inaccessible" />: old value is inaccessible
- &lt;watchvalue type=""> may contain a &lt;stream> element which indicates the old/new (type attribute) value of the variable
- &lt;watchrefcount type="" refcount="" isref="" />: old/new (type attribute) refcount and isref, both numbers
diff --git a/sapi/tests/test001.phpt b/sapi/tests/test001.phpt
deleted file mode 100644
index 318ab7a90f..0000000000
--- a/sapi/tests/test001.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-IIS style CGI missing SCRIPT_FILENAME
---DESCRIPTION--
-This would be similar to what IIS produces for a simple query.
---ENV--
-return <<<END
-PATH_TRANSLATED=$filename
-PATH_INFO=$scriptname
-SCRIPT_NAME=$scriptname
-END;
---FILE--
-<?php
- echo "HELLO";
-?>
---EXPECT--
-HELLO
diff --git a/sapi/tests/test002.phpt b/sapi/tests/test002.phpt
deleted file mode 100644
index 4afd8e276f..0000000000
--- a/sapi/tests/test002.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-Apache style CGI
---DESCRIPTION--
-Apache likes to set SCRIPT_FILENAME to the php executable
-if you use ScriptAlias configurations, and the proper
-path is in PATH_TRANSLATED. SCRIPT_NAME in this is faked,
-but that is ok, Apache sets SCRIPT_NAME to the ScriptAlias
-of the executable.
---ENV--
-return <<<END
-REDIRECT_URL=$scriptname
-PATH_TRANSLATED=$filename
-PATH_INFO=$scriptname
-SCRIPT_NAME=/scriptalias/php
-SCRIPT_FILENAME=$this->conf['TEST_PHP_EXECUTABLE']
-END;
---FILE--
-<?php
- echo "HELLO";
-?>
---EXPECT--
-HELLO
diff --git a/sapi/tests/test003.phpt b/sapi/tests/test003.phpt
deleted file mode 100644
index 24abdbbf41..0000000000
--- a/sapi/tests/test003.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-IIS style CGI missing SCRIPT_FILENAME, has PATH_INFO
---DESCRIPTION--
-This would be similar to what IIS produces for a simple query
-that also has PATH_INFO.
---REQUEST--
-return <<<END
-PATH_INFO=/path/info
-END;
---ENV--
-return <<<END
-PATH_TRANSLATED=/path/bla
-PATH_INFO=/path/info
-SCRIPT_NAME=path
-END;
---FILE--
-<?php
- echo $_SERVER['PATH_INFO'];
-?>
---EXPECT--
-/path/info
diff --git a/sapi/tests/test004.phpt b/sapi/tests/test004.phpt
deleted file mode 100644
index d1da1db6ed..0000000000
--- a/sapi/tests/test004.phpt
+++ /dev/null
@@ -1,26 +0,0 @@
---TEST--
-Apache style CGI with PATH_INFO
---DESCRIPTION--
-Apache likes to set SCRIPT_FILENAME to the php executable
-if you use ScriptAlias configurations, and the proper
-path is in PATH_TRANSLATED. SCRIPT_NAME in this is faked,
-but that is ok, Apache sets SCRIPT_NAME to the ScriptAlias
-of the executable.
---REQUEST--
-return <<<END
-PATH_INFO=/path/info
-END;
---ENV--
-return <<<END
-REDIRECT_URL=/path
-PATH_TRANSLATED=/path/info/fpp
-PATH_INFO=/path/info
-SCRIPT_NAME=/scriptalias/php
-SCRIPT_FILENAME=$this->conf['TEST_PHP_EXECUTABLE']
-END;
---FILE--
-<?php
- echo $_SERVER['PATH_INFO'];
-?>
---EXPECT--
-/path/info
diff --git a/sapi/tests/test005.phpt b/sapi/tests/test005.phpt
deleted file mode 100644
index 85143d5228..0000000000
--- a/sapi/tests/test005.phpt
+++ /dev/null
@@ -1,27 +0,0 @@
---TEST--
-QUERY_STRING Security Bug
---DESCRIPTION--
-This bug was present in PHP 4.3.0 only.
-A failure should print HELLO.
---REQUEST--
-return <<<END
-SCRIPT_NAME=/nothing.php
-QUERY_STRING=$filename
-END;
---ENV--
-return <<<END
-REDIRECT_URL=$scriptname
-PATH_TRANSLATED=c:\apache\1.3.27\htdocs\nothing.php
-QUERY_STRING=$filename
-PATH_INFO=/nothing.php
-SCRIPT_NAME=/phpexe/php.exe/nothing.php
-SCRIPT_FILENAME=c:\apache\1.3.27\htdocs\nothing.php
-END;
---FILE--
-<?php
- echo "HELLO";
-?>
---EXPECTHEADERS--
-Status: 404 Not Found
---EXPECT--
-No input file specified.
diff --git a/sapi/tests/test006.phpt b/sapi/tests/test006.phpt
deleted file mode 100644
index c43fe493c3..0000000000
--- a/sapi/tests/test006.phpt
+++ /dev/null
@@ -1,72 +0,0 @@
---TEST--
-Multipart Form POST Data
---HEADERS--
-return <<<END
-Content-Type=multipart/form-data; boundary=---------------------------240723202011929
-Content-Length=862
-END;
---ENV--
-return <<<END
-CONTENT_TYPE=multipart/form-data; boundary=---------------------------240723202011929
-CONTENT_LENGTH=862
-END;
---POST--
------------------------------240723202011929
-Content-Disposition: form-data; name="entry"
-
-entry box
------------------------------240723202011929
-Content-Disposition: form-data; name="password"
-
-password box
------------------------------240723202011929
-Content-Disposition: form-data; name="radio1"
-
-test 1
------------------------------240723202011929
-Content-Disposition: form-data; name="checkbox1"
-
-test 1
------------------------------240723202011929
-Content-Disposition: form-data; name="choices"
-
-Choice 1
------------------------------240723202011929
-Content-Disposition: form-data; name="choices"
-
-Choice 2
------------------------------240723202011929
-Content-Disposition: form-data; name="file"; filename="info.php"
-Content-Type: application/octet-stream
-
-<?php
-phpinfo();
-?>
------------------------------240723202011929--
---FILE--
-<?php
-error_reporting(0);
-print_r($_POST);
-print_r($_FILES);
-?>
---EXPECTF--
-Array
-(
- [entry] => entry box
- [password] => password box
- [radio1] => test 1
- [checkbox1] => test 1
- [choices] => Choice 2
-)
-Array
-(
- [file] => Array
- (
- [name] => info.php
- [type] => application/octet-stream
- [tmp_name] => %s
- [error] => 0
- [size] => 19
- )
-
-)
diff --git a/sapi/tests/test007.phpt b/sapi/tests/test007.phpt
deleted file mode 100644
index 76fca8fcd6..0000000000
--- a/sapi/tests/test007.phpt
+++ /dev/null
@@ -1,45 +0,0 @@
---TEST--
-Multipart Form POST Data, incorrect content length
---HEADERS--
-return <<<END
-Content-Type=multipart/form-data; boundary=---------------------------240723202011929
-Content-Length=100
-END;
---POST--
------------------------------240723202011929
-Content-Disposition: form-data; name="entry"
-
-entry box
------------------------------240723202011929
-Content-Disposition: form-data; name="password"
-
-password box
------------------------------240723202011929
-Content-Disposition: form-data; name="radio1"
-
-test 1
------------------------------240723202011929
-Content-Disposition: form-data; name="checkbox1"
-
-test 1
------------------------------240723202011929
-Content-Disposition: form-data; name="choices"
-
-Choice 1
------------------------------240723202011929
-Content-Disposition: form-data; name="choices"
-
-Choice 2
------------------------------240723202011929
-Content-Disposition: form-data; name="file"; filename="info.php"
-Content-Type: application/octet-stream
-
-<?php
-phpinfo();
-?>
------------------------------240723202011929--
---FILE--
-<?php
-print @$_POST['choices'];
-?>
---EXPECT--