mirror of
https://github.com/php/php-src.git
synced 2025-01-24 04:33:39 +08:00
Remove hebrevc() function
This commit is contained in:
parent
d2868edae0
commit
b63c625260
@ -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),
|
||||
|
@ -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)
|
||||
|
@ -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 */
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -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 />
|
||||
"
|
Loading…
Reference in New Issue
Block a user