A las clases/funciones/métodos de esta extensión se han realizado los siguientes cambios.
Version | Function | Description |
---|---|---|
8.4.0 | str_getcsv | Confiar en el valor por omisión de escape está ahora deprecado. |
str_getcsv | Ahora lanza una ValueError si separator, enclosure, o escape es inválido. Esto imita el comportamiento de fgetcsv y fputcsv. | |
strcspn | Antes de PHP 8.4.0, cuando characters era un string vacío, la búsqueda se detenía incorrectamente en el primer byte nulo en string. | |
8.3.0 | number_format | Se añadió el manejo de valores negativos para decimals. |
str_getcsv | Una cadena vacía es devuelta en lugar de una cadena que contiene un solo byte nulo para el último campo si este contiene únicamente un delimitador no terminado. | |
strrchr | El parámetro before_needle ha sido añadido. | |
strtok | Ahora emite un E_WARNING cuando el token no es proporcionado. | |
8.2.0 | lcfirst | Case conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted. |
str_ireplace | Case folding no longer depends on the locale set with setlocale. Only ASCII case folding will be done. Non-ASCII bytes will be compared by their byte value. | |
str_split | Si string está vacío, ahora se devuelve un array vacío. Anteriormente, se devolvía un array que contenía un único string vacío. | |
strcasecmp | This function is no longer guaranteed to return strlen($string1) - strlen($string2) when string lengths are not equal, but may now return -1 or 1 instead. | |
strcmp | This function is no longer guaranteed to return strlen($string1) - strlen($string2) when string lengths are not equal, but may now return -1 or 1 instead. | |
stripos | Case folding no longer depends on the locale set with setlocale. Only ASCII case folding will be done. Non-ASCII bytes will be compared by their byte value. | |
stristr | Case folding no longer depends on the locale set with setlocale. Only ASCII case folding will be done. Non-ASCII bytes will be compared by their byte value. | |
strnatcasecmp | This function is no longer guaranteed to return strlen($string1) - strlen($string2) when string lengths are not equal, but may now return -1 or 1 instead. | |
strnatcmp | This function is no longer guaranteed to return strlen($string1) - strlen($string2) when string lengths are not equal, but may now return -1 or 1 instead. | |
strncasecmp | This function is no longer guaranteed to return strlen($string1) - strlen($string2) when string lengths are not equal, but may now return -1 or 1 instead. | |
strncmp | This function is no longer guaranteed to return strlen($string1) - strlen($string2) when string lengths are not equal, but may now return -1 or 1 instead. | |
strripos | Case folding no longer depends on the locale set with setlocale. Only ASCII case folding will be done. Non-ASCII bytes will be compared by their byte value. | |
strtolower | Case conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted. | |
strtoupper | Case conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted. | |
substr_compare | This function is no longer guaranteed to return strlen($string1) - strlen($string2) when string lengths are not equal, but may now return -1 or 1 instead. | |
ucfirst | Case conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted. | |
ucwords | Case conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted. | |
utf8_decode | Esta función ha sido declarada obsoleta. | |
utf8_encode | Esta función ha sido declarada obsoleta. | |
8.1.0 | get_html_translation_table | flags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. |
html_entity_decode | flags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. | |
htmlentities | flags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. | |
htmlspecialchars | flags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. | |
htmlspecialchars_decode | flags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401. | |
8.0.0 | convert_cyr_string | Removed this function. |
convert_uuencode | Antes de esta versión, intentar convertir un string vacío devolvía false sin ninguna razón en particular. | |
count_chars | Anterior a esta versión, la función devolvía false en caso de error. | |
crypt | El salt ya no es opcional. | |
explode | explode lanzará ahora una ValueError cuando el parámetro separator es una string vacía (""). Anteriormente, explode retornaba false. | |
fprintf | This function no longer returns false on failure. | |
fprintf | Throw a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead. | |
fprintf | Throw a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
fprintf | Throw a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
fprintf | Throw a ArgumentCountError when less arguments are given than required; previously this function emitted a E_WARNING instead. | |
hebrevc | Removed this function. | |
html_entity_decode | encoding ahora puede ser nullable. | |
htmlentities | encoding ahora es nullable. | |
implode | Pasar el parámetro separator después del array ya no es compatible. | |
levenshtein | Antes de esta versión, levenshtein debía ser llamada con dos o cinco argumentos. | |
levenshtein | Antes de esta versión, levenshtein devolvía -1 si alguno de los strings de los argumentos superaba los 255 caracteres. | |
metaphone | Esta función devolvía false en caso de error. | |
money_format | Removed this function. | |
number_format | Antes de esta versión, number_format aceptaba uno, dos o cuatro argumentos (pero no tres). | |
parse_str | result ya no es opcional. | |
printf | This function no longer returns false on failure. | |
printf | Throw a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead. | |
printf | Throw a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
printf | Throw a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
printf | Throw a ArgumentCountError when less arguments are given than required; previously this function emitted a E_WARNING instead. | |
soundex | Antes de esta versión, llamar a la función con una cadena vacía retornaba false sin ninguna razón en particular. | |
sprintf | This function no longer returns false on failure. | |
sprintf | Throw a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead. | |
sprintf | Throw a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
sprintf | Throw a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
sprintf | Throw a ArgumentCountError when less arguments are given than required; previously this function emitted a E_WARNING instead. | |
str_split | Si length es menor que 1, se lanzará un ValueError; anteriormente, se emitía un error de tipo E_WARNING y la función devolvía false. | |
str_word_count | characters ahora es nullable. | |
strcspn | length ahora es nullable. | |
strip_tags | allowed_tags ahora puede ser nullable. | |
stripos | needle now accepts an empty string. | |
stripos | Pasar un entier como needle ya no está soportado. | |
stristr | needle now accepts an empty string. | |
stristr | Pasar un entier como needle ya no está soportado. | |
strpos | needle now accepts an empty string. | |
strpos | Pasar un entier como needle ya no está soportado. | |
strrchr | needle now accepts an empty string. | |
strrchr | Pasar un entier como needle ya no está soportado. | |
strripos | needle now accepts an empty string. | |
strripos | Pasar un entier como needle ya no está soportado. | |
strrpos | needle now accepts an empty string. | |
strrpos | Pasar un entier como needle ya no está soportado. | |
strspn | length es ahora nullable. | |
strstr | needle now accepts an empty string. | |
strstr | Pasar un entier como needle ya no es soportado. | |
substr | length es ahora nullable. Cuando length es explícitamente definido como null, la función devuelve un substring terminando al final del string, mientras que anteriormente devolvía un string vacío. | |
substr | Esta función devuelve un string vacío donde anteriormente devolvía false | |
substr_compare | length ahora es nullable. | |
substr_count | length ahora puede ser nullable. | |
substr_replace | length ahora es nullable. | |
vfprintf | This function no longer returns false on failure. | |
vfprintf | Throw a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead. | |
vfprintf | Throw a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
vfprintf | Throw a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
vfprintf | Throw a ValueError when less arguments are given than required; previously this function emitted a E_WARNING instead. | |
vprintf | This function no longer returns false on failure. | |
vprintf | Throw a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead. | |
vprintf | Throw a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
vprintf | Throw a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
vprintf | Throw a ValueError when less arguments are given than required; previously this function emitted a E_WARNING instead. | |
vsprintf | This function no longer returns false on failure. | |
vsprintf | Throw a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead. | |
vsprintf | Throw a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
vsprintf | Throw a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead. | |
vsprintf | Throw a ValueError when less arguments are given than required; previously this function emitted a E_WARNING instead. | |
wordwrap | Si break es un string vacío, se lanza una ValueError; anteriormente, en este caso, se emitía un E_WARNING y se devolvía false. | |
7.4.0 | chr | Esta función ya no acepta silenciosamente los codepoints no soportados, y convierte estos valores a 0. |
convert_cyr_string | Deprecated this function. | |
hebrevc | Deprecated this function. | |
implode | Pasar el parámetro separator después del array (es decir, sin utilizar el orden documentado de los parámetros) es obsoleto. | |
money_format | Deprecated this function. Utilizar NumberFormatter::formatCurrency en su lugar. | |
str_getcsv | El argumento escape interpreta ahora una cadena vacía como señal para desactivar el mecanismo de escape propio. Anteriormente, una cadena vacía era tratada como el valor por defecto del argumento. | |
strip_tags | allowed_tags ahora acepta un tableau. | |
7.3.5 | substr_compare | offset ahora puede ser igual al tamaño de haystack. |
7.3.0 | stripos | Pasar un entier como before_needle ha sido declarado obsoleto. |
stristr | Pasar un entier como before_needle se ha marcado como obsoleto. | |
strpos | Pasar un entier como before_needle ha sido declarado obsoleto. | |
strrchr | Pasar un entier como before_needle ha sido declarado obsoleto. | |
strripos | Pasar un entier como before_needle ha sido declarado obsoleto. | |
strrpos | Pasar un entier como before_needle ha sido declarado obsoleto. | |
strstr | Pasar un entier como before_needle ha sido declarado obsoleto. | |
7.2.18 | substr_compare | offset ahora puede ser igual al tamaño de haystack. |
7.2.0 | number_format | number_format fue modificado para no permitir devolver -0, anteriormente -0 podía ser devuelto para casos donde num valía -0.01. |
parse_str | El uso de parse_str sin el segundo argumento emite una nota E_DEPRECATED. | |
utf8_decode | Esta función fue movida al núcleo de PHP; anteriormente, era necesario instalar la extensión XML para utilizarla. | |
utf8_encode | Esta función fue movida al núcleo de PHP, anteriormente, era necesario instalar la extensión XML para utilizarla. | |
7.1.0 | str_shuffle | El algoritmo de aleatorización ha sido modificado para utilizar el Generador de Números Aleatorios Mersenne Twister en lugar de la función rand de libc. |
stripos | Se ha añadido soporte para números negativos en el parámetro offset. | |
strpos | Se ha añadido soporte para números negativos en el parámetro offset. | |
substr_count | Se agregó soporte para números negativos para offset y length. length también puede ser 0 ahora. |