Skip to content

Commit

Permalink
ext/standard/string.c: Remove to(upper|lower) PHP API in favour of Ze…
Browse files Browse the repository at this point in the history
…nd APIs
  • Loading branch information
Girgias committed Sep 12, 2024
1 parent 1b87772 commit 85e6688
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.
4 changes: 4 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ PHP 8.4 INTERNALS UPGRADE NOTES
- The deprecated php_uint32 and php_int32 typedefs have been removed from
ext/standard/basic_functions.h. Use the standard uint32_t and int32_t
types instead.
- The php_strtoupper(), php_string_toupper(), php_strtolower(), and
php_string_tolower() functions has been removed, use zend_str_toupper(),
zend_string_toupper(), zend_str_tolower(), and zend_string_tolower()
respectively instead.

h. ext/session
- Added the php_get_session_status() API to get the session status, which is
Expand Down
4 changes: 0 additions & 4 deletions ext/standard/php_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ PHP_MINIT_FUNCTION(string_intrin);
strnatcmp_ex(a, strlen(a), b, strlen(b), 1)
PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len, bool is_case_insensitive);
PHPAPI struct lconv *localeconv_r(struct lconv *out);
PHPAPI char *php_strtoupper(char *s, size_t len);
PHPAPI char *php_strtolower(char *s, size_t len);
PHPAPI zend_string *php_string_toupper(zend_string *s);
PHPAPI zend_string *php_string_tolower(zend_string *s);
PHPAPI char *php_strtr(char *str, size_t len, const char *str_from, const char *str_to, size_t trlen);
PHPAPI zend_string *php_addslashes(zend_string *str);
PHPAPI void php_stripslashes(zend_string *str);
Expand Down
30 changes: 0 additions & 30 deletions ext/standard/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -1211,21 +1211,6 @@ PHP_FUNCTION(strtok)
}
/* }}} */

/* {{{ php_strtoupper */
PHPAPI char *php_strtoupper(char *s, size_t len)
{
zend_str_toupper(s, len);
return s;
}
/* }}} */

/* {{{ php_string_toupper */
PHPAPI zend_string *php_string_toupper(zend_string *s)
{
return zend_string_toupper(s);
}
/* }}} */

/* {{{ Makes a string uppercase */
PHP_FUNCTION(strtoupper)
{
Expand All @@ -1239,21 +1224,6 @@ PHP_FUNCTION(strtoupper)
}
/* }}} */

/* {{{ php_strtolower */
PHPAPI char *php_strtolower(char *s, size_t len)
{
zend_str_tolower(s, len);
return s;
}
/* }}} */

/* {{{ php_string_tolower */
PHPAPI zend_string *php_string_tolower(zend_string *s)
{
return zend_string_tolower(s);
}
/* }}} */

/* {{{ Makes a string lowercase */
PHP_FUNCTION(strtolower)
{
Expand Down

0 comments on commit 85e6688

Please sign in to comment.