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),
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)
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 */
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)
PHP_FUNCTION(strtr);
PHP_FUNCTION(strrev);
PHP_FUNCTION(hebrev);
-PHP_FUNCTION(hebrevc);
PHP_FUNCTION(user_sprintf);
PHP_FUNCTION(user_printf);
PHP_FUNCTION(vprintf);
}
/* }}} */
-/* {{{ 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;
}
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);
}
/* }}} */
+++ /dev/null
---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 />
-"