]> granicus.if.org Git - php/commitdiff
Remove hebrevc() function
authorMáté Kocsis <kocsismate@woohoolabs.com>
Sun, 17 Nov 2019 19:56:03 +0000 (20:56 +0100)
committerMáté Kocsis <kocsismate@woohoolabs.com>
Thu, 5 Dec 2019 12:15:54 +0000 (13:15 +0100)
ext/opcache/Optimizer/zend_func_info.c
ext/standard/basic_functions.c
ext/standard/basic_functions.stub.php
ext/standard/basic_functions_arginfo.h
ext/standard/php_string.h
ext/standard/string.c
ext/standard/tests/strings/hebrevc_basic.phpt [deleted file]

index 593457d20cf5513259a3af7e223bff28fbe50f18..b902ac0a476c394aa468af94c8a4a22d8a132338 100644 (file)
@@ -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),
index 85cb04d3f0400cb6c52bf2d1aa1cf220288878b8..081c704c21dc29f9b404a25170913a12850d71d8 100755 (executable)
@@ -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)
index 8a047d1460598c516cbd7a99bbe9772d59591883..e513799c6f28026cd693744757ebfff933ed4c38 100755 (executable)
@@ -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 */
index 00d91461a9cfc751d7360ea94df46deac1b441c6..52eee589478d06d3fa0e411321bd003d73b29cbd 100755 (executable)
@@ -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)
index 7e5f6566e4db96643c71043f91d7bd36bcf8e57b..bdeb87b9123a7f1ca09201103f56fb1c46e0cb59 100644 (file)
@@ -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);
index 84159cb7b71f0430d9345db7a70a1d6538093e99..16f3f0d88e2637c1352dbb2e323aba47926969a2 100644 (file)
@@ -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 (file)
index 22b3ba3..0000000
+++ /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 />
-"