Merge remote-tracking branch 'origin/master' into native-tls

* origin/master:
  Revert HTTP status codes merger
  fixed tests, bugs in status codes merger
  Fixed bug #55415 (php_info produces invalid anchor names)
  NEWS
  Implement feature request #55467 (phpinfo: PHP Variables with $ and single quotes)
  NEWS
  Change back to use is_int() as function instead of is_integer(), as per Jan Tvrdík's request @github
  NEWS
  Change is_long() to be an alias of is_integer()
  Fix indentation
  Share HTTP status codes map
This commit is contained in:
Anatol Belski 2014-12-15 07:01:29 +01:00
commit 5ff59f986c
5 changed files with 22 additions and 12 deletions

5
NEWS
View file

@ -1,4 +1,4 @@
PHP NEWS PHP NEWS
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 20??, PHP 7.0.0 ?? ??? 20??, PHP 7.0.0
@ -26,6 +26,9 @@ PHP NEWS
constructor). (dunglas at gmail dot com) constructor). (dunglas at gmail dot com)
. Removed ZEND_ACC_FINAL_CLASS, promoting ZEND_ACC_FINAL as final class . Removed ZEND_ACC_FINAL_CLASS, promoting ZEND_ACC_FINAL as final class
modifier. (Guilherme Blanco) modifier. (Guilherme Blanco)
. is_long() & is_integer() is now an alias of is_int(). (Kalle)
. Implemented FR #55467 (phpinfo: PHP Variables with $ and single quotes). (Kalle)
. Fixed bug #55415 (php_info produces invalid anchor names). (Kalle, Johannes)
- Date: - Date:
. Fixed day_of_week function as it could sometimes return negative values . Fixed day_of_week function as it could sometimes return negative values

View file

@ -2513,7 +2513,7 @@ ZEND_BEGIN_ARG_INFO(arginfo_is_bool, 0)
ZEND_ARG_INFO(0, var) ZEND_ARG_INFO(0, var)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO(arginfo_is_long, 0) ZEND_BEGIN_ARG_INFO(arginfo_is_int, 0)
ZEND_ARG_INFO(0, var) ZEND_ARG_INFO(0, var)
ZEND_END_ARG_INFO() ZEND_END_ARG_INFO()
@ -3027,10 +3027,10 @@ const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(is_null, arginfo_is_null) PHP_FE(is_null, arginfo_is_null)
PHP_FE(is_resource, arginfo_is_resource) PHP_FE(is_resource, arginfo_is_resource)
PHP_FE(is_bool, arginfo_is_bool) PHP_FE(is_bool, arginfo_is_bool)
PHP_FE(is_long, arginfo_is_long) PHP_FE(is_int, arginfo_is_int)
PHP_FE(is_float, arginfo_is_float) PHP_FE(is_float, arginfo_is_float)
PHP_FALIAS(is_int, is_long, arginfo_is_long) PHP_FALIAS(is_integer, is_int, arginfo_is_int)
PHP_FALIAS(is_integer, is_long, arginfo_is_long) PHP_FALIAS(is_long, is_int, arginfo_is_int)
PHP_FALIAS(is_double, is_float, arginfo_is_float) PHP_FALIAS(is_double, is_float, arginfo_is_float)
PHP_FALIAS(is_real, is_float, arginfo_is_float) PHP_FALIAS(is_real, is_float, arginfo_is_float)
PHP_FE(is_numeric, arginfo_is_numeric) PHP_FE(is_numeric, arginfo_is_numeric)

View file

@ -143,7 +143,13 @@ PHPAPI void php_info_print_module(zend_module_entry *zend_module) /* {{{ */
{ {
if (zend_module->info_func || zend_module->version) { if (zend_module->info_func || zend_module->version) {
if (!sapi_module.phpinfo_as_text) { if (!sapi_module.phpinfo_as_text) {
php_info_printf("<h2><a name=\"module_%s\">%s</a></h2>\n", zend_module->name, zend_module->name); int len = 0;
zend_string *url_name = php_url_encode(zend_module->name, strlen(zend_module->name), &len);
php_strtolower(url_name->val, url_name->len);
php_info_printf("<h2><a name=\"module_%s\">%s</a></h2>\n", url_name->val, zend_module->name);
efree(url_name);
} else { } else {
php_info_print_table_start(); php_info_print_table_start();
php_info_print_table_header(1, zend_module->name); php_info_print_table_header(1, zend_module->name);
@ -206,8 +212,9 @@ static void php_print_gpcse_array(char *name, uint name_length)
php_info_print("<td class=\"e\">"); php_info_print("<td class=\"e\">");
} }
php_info_print("$");
php_info_print(name); php_info_print(name);
php_info_print("[\""); php_info_print("['");
if (string_key != NULL) { if (string_key != NULL) {
if (!sapi_module.phpinfo_as_text) { if (!sapi_module.phpinfo_as_text) {
@ -218,7 +225,7 @@ static void php_print_gpcse_array(char *name, uint name_length)
} else { } else {
php_info_printf(ZEND_ULONG_FMT, num_key); php_info_printf(ZEND_ULONG_FMT, num_key);
} }
php_info_print("\"]"); php_info_print("']");
if (!sapi_module.phpinfo_as_text) { if (!sapi_module.phpinfo_as_text) {
php_info_print("</td><td class=\"v\">"); php_info_print("</td><td class=\"v\">");
} else { } else {

View file

@ -30,7 +30,7 @@ PHP_FUNCTION(settype);
PHP_FUNCTION(is_null); PHP_FUNCTION(is_null);
PHP_FUNCTION(is_resource); PHP_FUNCTION(is_resource);
PHP_FUNCTION(is_bool); PHP_FUNCTION(is_bool);
PHP_FUNCTION(is_long); PHP_FUNCTION(is_int);
PHP_FUNCTION(is_float); PHP_FUNCTION(is_float);
PHP_FUNCTION(is_numeric); PHP_FUNCTION(is_numeric);
PHP_FUNCTION(is_string); PHP_FUNCTION(is_string);

View file

@ -271,10 +271,10 @@ PHP_FUNCTION(is_bool)
} }
/* }}} */ /* }}} */
/* {{{ proto bool is_long(mixed var) /* {{{ proto bool is_int(mixed var)
Returns true if variable is a long (integer) Returns true if variable is an integer
Warning: This function is special-cased by zend_compile.c and so is usually bypassed */ Warning: This function is special-cased by zend_compile.c and so is usually bypassed */
PHP_FUNCTION(is_long) PHP_FUNCTION(is_int)
{ {
php_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_LONG); php_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_LONG);
} }