-PHP NEWS
+PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 201?, PHP 5.3.99
- Upgraded bundled sqlite to version 3.6.23.1. (Ilia)
- Removed support for linking against MySQL client libraries older 4.1 from
PDO_mysql. (Johannes)
+- Implemented FR #52555 (Ability to get HTTP response code). (Paul Dragoonis)
- Implemented FR #51295 (SQLite3::busyTimeout not existing). (Mark)
- Implemented FR #48632 (OpenSSL AES support). (yonas dot y
at gmail dot com, Pierre)
ZEND_BEGIN_ARG_INFO(arginfo_headers_list, 0)
ZEND_END_ARG_INFO()
+
+ZEND_BEGIN_ARG_INFO(arginfo_http_response_code, 0)
+ZEND_END_ARG_INFO()
/* }}} */
/* {{{ html.c */
ZEND_BEGIN_ARG_INFO_EX(arginfo_htmlspecialchars, 0, 0, 1)
PHP_FE(header_remove, arginfo_header_remove)
PHP_FE(headers_sent, arginfo_headers_sent)
PHP_FE(headers_list, arginfo_headers_list)
+ PHP_FE(http_response_code, arginfo_http_response_code)
PHP_FE(connection_aborted, arginfo_connection_aborted)
PHP_FE(connection_status, arginfo_connection_status)
}
/* }}} */
+/* {{{ proto long http_response_code()
+ Returns the current HTTP response code */
+PHP_FUNCTION(http_response_code)
+{
+ if (zend_parse_parameters_none() == FAILURE) {
+ return;
+ }
+
+ RETURN_LONG(SG(sapi_headers).http_response_code);
+}
+/* }}} */
+
/*
* Local variables:
* tab-width: 4
PHP_FUNCTION(setrawcookie);
PHP_FUNCTION(headers_sent);
PHP_FUNCTION(headers_list);
+PHP_FUNCTION(http_response_code);
PHPAPI int php_header(TSRMLS_D);
PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, time_t expires, char *path, int path_len, char *domain, int domain_len, int secure, int url_encode, int httponly TSRMLS_DC);