diff options
-rw-r--r-- | ext/opcache/Optimizer/zend_func_info.c | 1 | ||||
-rwxr-xr-x | ext/standard/basic_functions.c | 1 | ||||
-rwxr-xr-x | ext/standard/basic_functions.stub.php | 2 | ||||
-rwxr-xr-x | ext/standard/basic_functions_arginfo.h | 2 | ||||
-rw-r--r-- | ext/standard/php_string.h | 1 | ||||
-rw-r--r-- | ext/standard/string.c | 32 | ||||
-rw-r--r-- | ext/standard/tests/strings/hebrevc_basic.phpt | 49 |
7 files changed, 4 insertions, 84 deletions
diff --git a/ext/opcache/Optimizer/zend_func_info.c b/ext/opcache/Optimizer/zend_func_info.c index 593457d20c..b902ac0a47 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 85cb04d3f0..081c704c21 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 8a047d1460..e513799c6f 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 00d91461a9..52eee58947 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 7e5f6566e4..bdeb87b912 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 84159cb7b7..16f3f0d88e 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 22b3ba3d3e..0000000000 --- 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 /> -" |