com php-src: Remove hebrevc() function: ext/opcache/Optimizer/z end_func_info.c ext/standard/basic_functions.c ex t/standard/basic_functions.stub.php
ext/standard/basic _functions_arginfo.h ext/standard/php_string.h ex t/standard/string.c ext/standard/tests/strings/hebrevc_ba sic.phpt
| From: | Máté Kocsis | Date: | Thu, 05 Dec 2019 12:15:54 +0000 |
| Subject: | com php-src: Remove hebrevc() function: ext/opcache/Optimizer/z end_func_info.c ext/standard/basic_functions.c ex t/standard/basic_functions.stub.php ext/standard/basic _functions_arginfo.h ext/standard/php_string.h ex t/standard/string.c ext/standard/tests/strings/hebrevc_ba sic.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-109398@lists.php.net to get a copy of this message | ||
Commit: b63c62526096e9c2196a039bd62e6a35252022b8
Author: Máté Kocsis <kocsismate@woohoolabs.com> Sun, 17 Nov 2019 20:56:03 +0100
Parents: d2868edae05eda138e377296dcc4693178b2ea20
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b63c62526096e9c2196a039bd62e6a35252022b8
Log:
Remove hebrevc() function
Changed paths:
M ext/opcache/Optimizer/zend_func_info.c
M ext/standard/basic_functions.c
M ext/standard/basic_functions.stub.php
M ext/standard/basic_functions_arginfo.h
M ext/standard/php_string.h
M ext/standard/string.c
D ext/standard/tests/strings/hebrevc_basic.phpt
Diff:
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c
index 593457d20cf..b902ac0a476 100644
--- a/ext/opcache/Optimizer/zend_func_info.c
+++ b/ext/opcache/Optimizer/zend_func_info.c
@@ -151,7 +151,6 @@ static const func_info_t func_infos[] = {
FN("strtolower", MAY_BE_STRING),
F1("strrev", MAY_BE_STRING),
F1("hebrev", MAY_BE_STRING),
- F1("hebrevc", MAY_BE_STRING),
FN("nl2br", MAY_BE_STRING),
F1("basename", MAY_BE_STRING),
F1("dirname", MAY_BE_STRING),
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 85cb04d3f04..081c704c21d 100755
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -914,7 +914,6 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
PHP_FE(strripos, arginfo_strripos)
PHP_FE(strrev, arginfo_strrev)
PHP_FE(hebrev, arginfo_hebrev)
- PHP_DEP_FE(hebrevc, arginfo_hebrevc)
PHP_FE(nl2br, arginfo_nl2br)
PHP_FE(basename, arginfo_basename)
PHP_FE(dirname, arginfo_dirname)
diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php
index 8a047d14605..e513799c6f2 100755
--- a/ext/standard/basic_functions.stub.php
+++ b/ext/standard/basic_functions.stub.php
@@ -634,8 +634,6 @@ function str_ireplace(
function hebrev(string $str, int $max_chars_per_line = 0): string {}
-function hebrevc(string $str, int $max_chars_per_line = 0): string {}
-
function nl2br(string $str, bool $is_xhtml = true): string {}
/** @param mixed $allowable_tags */
diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h
index 00d91461a9c..52eee589478 100755
--- a/ext/standard/basic_functions_arginfo.h
+++ b/ext/standard/basic_functions_arginfo.h
@@ -981,8 +981,6 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_hebrev, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, max_chars_per_line, IS_LONG, 0)
ZEND_END_ARG_INFO()
-#define arginfo_hebrevc arginfo_hebrev
-
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_nl2br, 0, 1, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, str, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, is_xhtml, _IS_BOOL, 0)
diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h
index 7e5f6566e4d..bdeb87b9123 100644
--- a/ext/standard/php_string.h
+++ b/ext/standard/php_string.h
@@ -52,7 +52,6 @@ PHP_FUNCTION(ucwords);
PHP_FUNCTION(strtr);
PHP_FUNCTION(strrev);
PHP_FUNCTION(hebrev);
-PHP_FUNCTION(hebrevc);
PHP_FUNCTION(user_sprintf);
PHP_FUNCTION(user_printf);
PHP_FUNCTION(vprintf);
diff --git a/ext/standard/string.c b/ext/standard/string.c
index 84159cb7b71..16f3f0d88e2 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -4379,12 +4379,9 @@ PHP_FUNCTION(str_ireplace)
}
/* }}} */
-/* {{{ php_hebrev
- *
- * Converts Logical Hebrew text (Hebrew Windows style) to Visual text
- * Cheers/complaints/flames - Zeev Suraski <zeev@php.net>
- */
-static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines)
+/* {{{ proto string hebrev(string str [, int max_chars_per_line])
+ Converts logical Hebrew text to visual text */
+PHP_FUNCTION(hebrev)
{
char *str, *heb_str, *target;
const char *tmp;
@@ -4544,28 +4541,7 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS, int convert_newlines)
}
efree(heb_str);
- if (convert_newlines) {
- RETVAL_STR(php_char_to_str_ex(broken_str, '\n', "<br />\n", 7, 1,
NULL));
- zend_string_release_ex(broken_str, 0);
- } else {
- RETURN_NEW_STR(broken_str);
- }
-}
-/* }}} */
-
-/* {{{ proto string hebrev(string str [, int max_chars_per_line])
- Converts logical Hebrew text to visual text */
-PHP_FUNCTION(hebrev)
-{
- php_hebrev(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
-}
-/* }}} */
-
-/* {{{ proto string hebrevc(string str [, int max_chars_per_line])
- Converts logical Hebrew text to visual text with newline conversion */
-PHP_FUNCTION(hebrevc)
-{
- php_hebrev(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1);
+ RETURN_NEW_STR(broken_str);
}
/* }}} */
diff --git a/ext/standard/tests/strings/hebrevc_basic.phpt
b/ext/standard/tests/strings/hebrevc_basic.phpt
deleted file mode 100644
index 22b3ba3d3ee..00000000000
--- a/ext/standard/tests/strings/hebrevc_basic.phpt
+++ /dev/null
@@ -1,49 +0,0 @@
---TEST--
-Test hebrevc() function : basic functionality
---FILE--
-<?php
-
-/* Prototype : string hebrevc ( string $hebrew_text [, int $max_chars_per_line ] )
- * Description: Convert logical Hebrew text to visual text
- * Source code: ext/standard/string.c
-*/
-
-echo "*** Testing hebrevc() : basic functionality ***\n";
-
-$hebrew_text = "The hebrevc function converts logical Hebrew text to visual text.\nThis
function is similar to hebrev() with the difference that it converts newlines (\n) to
'<br>\n'.\nThe function tries to avoid breaking words.\n";
-
-var_dump(hebrevc($hebrew_text));
-var_dump(hebrevc($hebrew_text, 15));
-
-?>
---EXPECTF--
-*** Testing hebrevc() : basic functionality ***
-
-Deprecated: Function hebrevc() is deprecated in %s on line %d
-string(239) ".The hebrevc function converts logical Hebrew text to visual text<br />
-) This function is similar to hebrev() with the difference that it converts newlines<br />
-<to '<br (<br />
-.'<br />
-.The function tries to avoid breaking words<br />
-"
-
-Deprecated: Function hebrevc() is deprecated in %s on line %d
-string(317) "to visual text<br />
-Hebrew text<br />
-logical<br />
-converts<br />
-function<br />
-.The hebrevc<br />
-newlines<br />
-it converts<br />
-difference that<br />
-with the<br />
-to hebrev()<br />
-is similar<br />
-) This function<br />
-<to '<br (<br />
-.'<br />
-breaking words<br />
-tries to avoid<br />
-.The function<br />
-"