PHP 8.5.0 Alpha 1 available for testing

Registro de cambios

A las clases/funciones/métodos de esta extensión se han realizado los siguientes cambios.

VersionFunctionDescription
8.4.0str_getcsvConfiar en el valor por omisión de escape está ahora deprecado.
 str_getcsvAhora lanza una ValueError si separator, enclosure, o escape es inválido. Esto imita el comportamiento de fgetcsv y fputcsv.
 strcspnAntes 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.0number_formatSe añadió el manejo de valores negativos para decimals.
 str_getcsvUna 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.
 strrchrEl parámetro before_needle ha sido añadido.
 strtokAhora emite un E_WARNING cuando el token no es proporcionado.
8.2.0lcfirstCase conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted.
 str_ireplaceCase 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_splitSi 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.
 strcasecmpThis 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.
 strcmpThis 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.
 striposCase 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.
 stristrCase 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.
 strnatcasecmpThis 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.
 strnatcmpThis 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.
 strncasecmpThis 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.
 strncmpThis 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.
 strriposCase 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.
 strtolowerCase conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted.
 strtoupperCase conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted.
 substr_compareThis 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.
 ucfirstCase conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted.
 ucwordsCase conversion no longer depends on the locale set with setlocale. Only ASCII characters will be converted.
 utf8_decodeEsta función ha sido declarada obsoleta.
 utf8_encodeEsta función ha sido declarada obsoleta.
8.1.0get_html_translation_tableflags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401.
 html_entity_decodeflags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401.
 htmlentitiesflags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401.
 htmlspecialcharsflags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401.
 htmlspecialchars_decodeflags cambió de ENT_COMPAT a ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401.
8.0.0convert_cyr_stringRemoved this function.
 convert_uuencodeAntes de esta versión, intentar convertir un string vacío devolvía false sin ninguna razón en particular.
 count_charsAnterior a esta versión, la función devolvía false en caso de error.
 cryptEl salt ya no es opcional.
 explodeexplode lanzará ahora una ValueError cuando el parámetro separator es una string vacía (""). Anteriormente, explode retornaba false.
 fprintfThis function no longer returns false on failure.
 fprintfThrow a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead.
 fprintfThrow a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 fprintfThrow a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 fprintfThrow a ArgumentCountError when less arguments are given than required; previously this function emitted a E_WARNING instead.
 hebrevcRemoved this function.
 html_entity_decodeencoding ahora puede ser nullable.
 htmlentitiesencoding ahora es nullable.
 implodePasar el parámetro separator después del array ya no es compatible.
 levenshteinAntes de esta versión, levenshtein debía ser llamada con dos o cinco argumentos.
 levenshteinAntes de esta versión, levenshtein devolvía -1 si alguno de los strings de los argumentos superaba los 255 caracteres.
 metaphoneEsta función devolvía false en caso de error.
 money_formatRemoved this function.
 number_formatAntes de esta versión, number_format aceptaba uno, dos o cuatro argumentos (pero no tres).
 parse_strresult ya no es opcional.
 printfThis function no longer returns false on failure.
 printfThrow a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead.
 printfThrow a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 printfThrow a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 printfThrow a ArgumentCountError when less arguments are given than required; previously this function emitted a E_WARNING instead.
 soundexAntes de esta versión, llamar a la función con una cadena vacía retornaba false sin ninguna razón en particular.
 sprintfThis function no longer returns false on failure.
 sprintfThrow a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead.
 sprintfThrow a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 sprintfThrow a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 sprintfThrow a ArgumentCountError when less arguments are given than required; previously this function emitted a E_WARNING instead.
 str_splitSi 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_countcharacters ahora es nullable.
 strcspnlength ahora es nullable.
 strip_tagsallowed_tags ahora puede ser nullable.
 striposneedle now accepts an empty string.
 striposPasar un entier como needle ya no está soportado.
 stristrneedle now accepts an empty string.
 stristrPasar un entier como needle ya no está soportado.
 strposneedle now accepts an empty string.
 strposPasar un entier como needle ya no está soportado.
 strrchrneedle now accepts an empty string.
 strrchrPasar un entier como needle ya no está soportado.
 strriposneedle now accepts an empty string.
 strriposPasar un entier como needle ya no está soportado.
 strrposneedle now accepts an empty string.
 strrposPasar un entier como needle ya no está soportado.
 strspnlength es ahora nullable.
 strstrneedle now accepts an empty string.
 strstrPasar un entier como needle ya no es soportado.
 substrlength 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.
 substrEsta función devuelve un string vacío donde anteriormente devolvía false
 substr_comparelength ahora es nullable.
 substr_countlength ahora puede ser nullable.
 substr_replacelength ahora es nullable.
 vfprintfThis function no longer returns false on failure.
 vfprintfThrow a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead.
 vfprintfThrow a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 vfprintfThrow a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 vfprintfThrow a ValueError when less arguments are given than required; previously this function emitted a E_WARNING instead.
 vprintfThis function no longer returns false on failure.
 vprintfThrow a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead.
 vprintfThrow a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 vprintfThrow a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 vprintfThrow a ValueError when less arguments are given than required; previously this function emitted a E_WARNING instead.
 vsprintfThis function no longer returns false on failure.
 vsprintfThrow a ValueError if the number of arguments is zero; previously this function emitted a E_WARNING instead.
 vsprintfThrow a ValueError if [width] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 vsprintfThrow a ValueError if [precision] is less than zero or bigger than PHP_INT_MAX; previously this function emitted a E_WARNING instead.
 vsprintfThrow a ValueError when less arguments are given than required; previously this function emitted a E_WARNING instead.
 wordwrapSi 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.0chrEsta función ya no acepta silenciosamente los codepoints no soportados, y convierte estos valores a 0.
 convert_cyr_stringDeprecated this function.
 hebrevcDeprecated this function.
 implodePasar el parámetro separator después del array (es decir, sin utilizar el orden documentado de los parámetros) es obsoleto.
 money_formatDeprecated this function. Utilizar NumberFormatter::formatCurrency en su lugar.
 str_getcsvEl 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_tagsallowed_tags ahora acepta un tableau.
7.3.5substr_compareoffset ahora puede ser igual al tamaño de haystack.
7.3.0striposPasar un entier como before_needle ha sido declarado obsoleto.
 stristrPasar un entier como before_needle se ha marcado como obsoleto.
 strposPasar un entier como before_needle ha sido declarado obsoleto.
 strrchrPasar un entier como before_needle ha sido declarado obsoleto.
 strriposPasar un entier como before_needle ha sido declarado obsoleto.
 strrposPasar un entier como before_needle ha sido declarado obsoleto.
 strstrPasar un entier como before_needle ha sido declarado obsoleto.
7.2.18substr_compareoffset ahora puede ser igual al tamaño de haystack.
7.2.0number_formatnumber_format fue modificado para no permitir devolver -0, anteriormente -0 podía ser devuelto para casos donde num valía -0.01.
 parse_strEl uso de parse_str sin el segundo argumento emite una nota E_DEPRECATED.
 utf8_decodeEsta función fue movida al núcleo de PHP; anteriormente, era necesario instalar la extensión XML para utilizarla.
 utf8_encodeEsta función fue movida al núcleo de PHP, anteriormente, era necesario instalar la extensión XML para utilizarla.
7.1.0str_shuffleEl 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.
 striposSe ha añadido soporte para números negativos en el parámetro offset.
 strposSe ha añadido soporte para números negativos en el parámetro offset.
 substr_countSe agregó soporte para números negativos para offset y length. length también puede ser 0 ahora.
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top