PHP 5.6.0 released

Storico dei cambiamenti

Le seguenti modifiche sono state apportate alle funzioni delle estensioni del pacchetto.

VersionFunctionDescription
PHP 5.2.2DOMDocument::registerNodeClassPrior to 5.2.2, a previously registered extendedclass had to be unregistered before being able to register a new class extending the same baseclass.
6error_reportingE_STRICT è diventata parte di E_ALL.
5.6.0Countable::countThe optional mode parameter was added.
 json_decodeInvalid non-lowercased variants of the true, false and null literals are no longer accepted as valid input, and will generate warnings.
 mb_regex_encodingDefault encoding is changed to UTF-8. It was EUC-JP Previously.
 pg_lo_truncateAdded truncate function. It supports PostgreSQL 9.3's 64bit large object. Both client and server must support PostgreSQL 9.3 and PHP must be 64bit build to use 64bit large object.
5.5.2DOMDocument::schemaValidateAdded the flags parameter
 DOMDocument::schemaValidateSourceAdded the flags parameter
5.5.1hex2binA warning is thrown if the input string is invalid hexadecimal string.
5.5.0/PECL 3.0.0IntlDateFormatter::createAn IntlCalendar object is allowed for calendar. Objects of type IntlTimeZone and DateTimeZone are allowed for timezone. Invalid timezone identifiers (including empty strings) are no longer allowed for timezone. If NULL is given for timezone, the timezone identifier given by date_default_timezone_get will be used instead of ICUʼs default.
 IntlDateFormatter::formatSupport for providing IntlCalendar objects to the value parameter was added.
 IntlDateFormatter::setCalendarIt became possible to pass an IntlCalendar object.
5.5.0emptyempty ora supporta le espressioni, piuttosto che solo variabili.
 gd_infoWebP Support added.
 imagerotateThis function is now affected by the interpolation method set by the imagesetinterpolation function.
 iterator_to_arrayiterator_to_array gained support for key types other than integer and string when the use_keys parameter is enabled.
 json_encodedepth parameter was added.
 packThe "Z" code was added with equivalent functionality to "a" for Perl compatibility.
 setcookieA Max-Age attribute is now included in the Set-Cookie header sent to the client.
 setrawcookieA Max-Age attribute is now included in the Set-Cookie header sent to the client.
 unpackChanges were made to bring this function into line with Perl: The "a" code now retains trailing NULL bytes. The "A" code now strips all trailing ASCII whitespace (spaces, tabs, newlines, carriage returns, and NULL bytes). The "Z" code was added for NULL-padded strings, and removes trailing NULL bytes.
 mysqli::commitAdded flags and name parameters.
 mysqli::optionsThe MYSQLI_SERVER_PUBLIC_KEY option was added.
 mysqli::rollbackAdded flags and name parameters.
 SoapClient::SoapClientNew ssl_method option.
5.4.7parse_urlFixed host recognition when scheme is omitted and a leading component separator is present.
5.4.1hex2binA warning is thrown if the input string is of odd length. In PHP 5.4.0 the string was silently accepted, but the last byte was truncated.
5.4.0/PECL 2.0.0b1idn_to_asciiAdded the parameters variant and idna_info; UTS #46 support.
 idn_to_utf8Added the parameters variant and idna_info; UTS #46 support.
5.4.0DOMDocument::loadHTMLAdded options parameter.
 DOMDocument::loadHTMLFileAdded options parameter.
 apache_child_terminateQuesta funzione diventa disponibile sotto FastCGI. Precedentemente, era supportata solo quando PHP era installato come modulo Apache.
 array_combineLe precedenti versioni generavano un E_WARNING e restituivano FALSE per gli array vuoti.
 date_default_timezone_getThe timezone is no longer guessed from information available through the operating system as the guessed timezone can not be relied on.
 date_default_timezone_getThe TZ environment variable is no longer used to guess the timezone.
 dns_get_recordAdded raw parameter.
 emptyIl controllo su offset non numerici di stringhe restituisce TRUE.
 filter_input_arrayAdded add_empty parameter.
 filter_var_arrayAdded add_empty parameter.
 gzcompressAggiunto il parametro encoding.
 hashThe tiger algorithm now uses big-endian byte ordering.
 hash_algosSupport for joaat, fnv132 and fnv164 was added. Support for Salsa10 and Salsa20 was removed.
 htmlspecialchars_decodeThe constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added.
 http_build_queryThe enc_type parameter was added.
 imagecolorsetThe alpha parameter was added.
 json_decodeThe options parameter was added.
 json_encodeJSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, and JSON_UNESCAPED_UNICODE options were added.
 mb_encode_numericentityAdded is_hex parameter.
 ob_startThe third parameter of ob_start changed from a boolean parameter called erase (which, if set to FALSE, would prevent the output buffer from being deleted until the script finished executing) to an integer parameter called flags. Unfortunately, this results in an API compatibility break for code written prior to PHP 5.4.0 that uses the third parameter. See the flags example for an example of how to handle this with code that needs to be compatible with both.
 ob_startA chunk size of 1 now results in chunks of 1 byte being sent to the output buffer.
 openssl_decryptThe raw_output was changed to options.
 openssl_encryptThe raw_output was changed to options.
 scandirsorting_order constants were added. Any nonzero value caused descending order in previous versions. So for all PHP versions, use 0 for ascending order, and 1 for descending order. An option for SCANDIR_SORT_NONE behavior did not exist prior to PHP 5.4.0.
 snmp_set_valueretrievalConstants SNMP_VALUE_PLAIN or SNMP_VALUE_LIBRARY may be combined with SNMP_VALUE_OBJECT resulting different way of representing contents of value array element in return value of GET-function. If no SNMP_VALUE_{PLAIN,LIBRARY} constant is accompanying SNMP_VALUE_OBJECT, SNMP_VALUE_LIBRARY is used. Prior to 5.4.0 SNMP_VALUE_OBJECT effecively meant SNMP_VALUE_OBJECT|SNMP_VALUE_PLAIN.
 Phar::setStubAdded len parameter.
 PharData::setStubAdded len parameter.
 SimpleXMLElement::getDocNamespacesAdded from_root parameter.
 SoapClient::SoapClientNew keep_alive option.
5.4grapheme_substrIf length is given and positive and the argument string is shorter than the specified length, all the rest of the string according to start parameter is returned. Previously, FALSE was returned.
5.3.6DateTime::modifyAbsolute date/time statements now take effect. Previously, only relative parts were used.
 DOMDocument::saveHTMLThe node parameter was added.
 array_productThe product of an empty array is now 1, when before this function would return 0 for an empty array.
 PDO_MYSQL DSNPrior to version 5.3.6, charset was ignored.
5.3.4rawurlencodeTilde characters are no longer encoded when rawurlencode is used with EBCDIC strings.
 sleepBefore PHP 5.3.4, on Windows, sleep always returns NULL when sleep has occurred, regardless of whether the sleep was interrupted or not.
 IntlDateFormatter::formatSupport for providing DateTime objects to the value parameter was added.
 mysqli_driver::$report_modeChanging the reporting mode is now be per-request, rather than per-process.
5.3.3DOMXPath::evaluateThe registerNodeNS parameter was added.
 DOMXPath::queryThe registerNodeNS parameter was added.
 json_encodeJSON_NUMERIC_CHECK option was added.
 ldap_sasl_bindSupport on Windows was added.
 openssl_decryptThe iv parameter was added.
 openssl_encryptThe iv parameter was added.
 parse_urlRemoved the E_WARNING that was emitted when URL parsing failed.
5.3.2 (PECL OCI8 1.4)oci_set_prefetchBefore this release, rows must be >= 1.
5.3.2imap_appendAdded INTERNALDATE support to imap_append.
 imap_openparams added
5.3.0 (PECL OCI8 1.3.4)oci_set_prefetchBefore this release, prefetching was limited to the lesser of rows rows and 1024 * rows bytes. The byte size restriction has now been removed.
5.3.0DateTime::__constructIf time contains an invalid date/time format, then an exception is now thrown. Previously an error was emitted.
 DateTime::modifyModificato il valore di ritorno in caso di successo da NULL a DateTime.
 DateTime::setDateModificato il valore di ritorno in caso di successo da NULL a DateTime.
 DateTime::setISODateModificato il valore di ritorno in caso di successo da NULL a DateTime.
 DateTime::setTimeModificato il valore di ritorno in caso di successo da NULL a DateTime.
 DateTime::setTimezoneModificato il valore di ritorno in caso di successo da NULL a DateTime.
 DateTimeZone::getTransitionsThe optional timestamp_begin and timestamp_end were added.
 DateTimeZone::listIdentifiersAdded the optional what and country parameters.
 DirectoryIterator::__constructThrows UnexpectedValueException if the path cannot be opened.
 call_user_funcThe interpretation of object oriented keywords like parent and self has changed. Previously, calling them using the double colon syntax would emit an E_STRICT warning because they were interpreted as static.
 call_user_func_arrayThe interpretation of object oriented keywords like parent and self has changed. Previously, calling them using the double colon syntax would emit an E_STRICT warning because they were interpreted as static.
 date_default_timezone_setNow throws E_WARNING rather than E_STRICT.
 dns_get_recordPrior to this release, if the authns parameter was given, the addtl parameter was also required.
 dns_get_recordThis function is now available on Windows platforms.
 exif_imagetypeAdded icon support.
 fnmatchThis function is now available on Windows platforms.
 func_get_argIf this function is called from the outermost scope of a file which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns FALSE.
 func_get_argThis function can now be used in parameter lists.
 func_get_argsIf this function is called from the outermost scope of a file which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns FALSE.
 func_get_argsThis function can now be used in parameter lists.
 func_num_argsIf this function is called from the outermost scope of a file which has been included by calling include or require from within a function in the calling file, it now generates a warning and returns -1.
 func_num_argsThis function can now be used in parameter lists.
 gd_infoJPG Support attribute renamed to JPEG Support.
 getimagesizeAdded icon support.
 hash_algosSupport for md2, ripemd256, ripemd320, salsa10, salsa20, snefru256 and sha224 was added
 imagecolorclosesthwbThis function is now available on Windows
 imagefilterPixelation support (IMG_FILTER_PIXELATE) was added.
 inet_ntopThis function is now available on Windows platforms.
 inet_ptonThis function is now available on Windows platforms.
 json_decodeAdded the optional depth. The default recursion depth was increased from 128 to 512
 json_encodeThe options parameter was added.
 mb_get_infoThe entry "http_output_conv_mimetypes" was made available.
 mcrypt_create_ivIt is no longer required to call srand first. This is now done automatically.
 mcrypt_create_ivMCRYPT_DEV_RANDOM and MCRYPT_DEV_URANDOM became available on Windows platforms.
 property_existsThis function checks the existence of a property independent of accessibility.
 rawurlencodeNow conforms to RFC 3986.
 register_tick_functionTicks are now supported on threaded web server modules.
 setlocaleQuesta funzione emette un avviso E_DEPRECATED se una stringa è passata al parametro category invece che una delle costanti LC_*.
 spl_autoload_registerNamespaces support was introduced.
 spl_autoload_registerThe prepend parameter was added.
 stream_context_createAdded the optional params argument.
 stream_socket_pairThis function is now available on Windows platforms.
 sybase_connectThe new parameter was added.
 time_nanosleepThis function is now available on Windows platforms.
 time_sleep_untilThis function is now available on Windows platforms.
 mysqli::__constructAdded the ability of persistent connections.
 mysqli::queryAdded the ability of async queries.
 ReflectionFunction::__constructname can now be a closure.
 SplObjectStorage::attachAdded the data parameter.
5.2.15mysqli_driver::$report_modeChanging the reporting mode is now be per-request, rather than per-process.
5.2.8XSLTProcessor::importStylesheetAccepts SimpleXMLElement again which was broken since PHP 5.2.6.
5.2.7error_logAggiunto il valore 4 per message_type
5.2.5debug_backtraceAggiunto il parametro opzionale provide_object.
 imagefilterAlpha support for IMG_FILTER_COLORIZE was added.
5.2.4ldap_first_attributeThe ber_identifier was removed. This is now handled automatically by PHP.
 ldap_next_attributeThe ber_identifier was removed. This is now handled automatically by PHP.
 stream_wrapper_registerAdded the flags parameter.
5.2.3getimagesizeRead errors generated by this function downgraded to E_NOTICE from E_WARNING.
 json_decodeThe nesting limit was increased from 20 to 128
 XMLWriter::writeElementThe content parameter became optional.
 XMLWriter::writeElementNSThe content parameter became optional.
 PDOStatement::getColumnMetatable field
5.2.2proc_terminatePrevious versions used to destroy the given process resource.
 token_get_allLine numbers are returned in element 2
5.2.1iterator_to_arrayThe use_keys parameter was added.
 json_decodeAdded support for JSON decoding of basic types.
 memory_get_peak_usageCompiling with --enable-memory-limit is no longer required for this function to exist.
 proc_openAdded the bypass_shell option to the other_options parameter.
5.2.0base64_decodestrict added
 error_reportingInserita E_RECOVERABLE_ERROR.
 imagettftextIt is now possible to specify an hexadecimal entity in text.
 imap_openn_retries added
 imap_reopenn_retries added
 mb_strrposAdded the optional parameter offset.
 memory_get_peak_usagereal_usage was added.
 openssl_verifyThe signature_alg parameter was added.
 setcookieThe httponly parameter was added.
 setrawcookieThe httponly parameter was added.
 snmp_set_oid_numeric_printSince PHP 5.2.0.
 PDOStatement::executeThe keys from input_parameters must match the ones declared in the SQL. Before PHP 5.2.0 this was silently ignored.
 SimpleXMLElement::childrenThe optional parameter is_prefix was added.
 SimpleXMLElement::__constructAdded the ns and is_prefix parameters.
 SoapServer::SoapServerAdded the typemap option.
 XMLReader::openencoding and options were added.
 XMLReader::XMLencoding and options were added.
5.1.3DirectoryIterator::__constructThrows RuntimeException if the path is an empty string.
 get_headersThis function now uses the default stream context, which can be set/changed with the stream_context_set_default function.
 http_build_querySquare brackets are escaped.
 imagecolorallocateReturns FALSE if the allocation failed. Previously -1 was returned.
 imagecolorallocatealphaReturns FALSE if the allocation failed. Previously -1 was returned.
 imagepngAdded the filters parameter.
 mb_get_infoThe entries "mail_charset", "mail_header_encoding", and "mail_body_encoding" were made available.
 SoapClient::__doRequestThe one_way parameter was added.
 XMLReader::getAttributeReturn NULL if no attribute found. Previously, returned an empty string.
5.1.2date_default_timezone_setThe function started to validate the timezone_identifier parameter.
 http_build_queryThe arg_separator parameter was added.
 imagepngAdded the quality parameter.
 parse_urlAdded the component parameter.
 SimpleXMLElement::__constructAdded the options and data_is_url parameters.
5.1.1debug_backtraceAggiunto l'object corrente come possibile elemento di ritorno.
5.1.0DirectoryIterator::__constructThrows RuntimeException on error. Previously, threw Exception.
 DOMDocument::saveAdded the options parameter
 DOMDocument::saveXMLAdded the options parameter
 class_implementsAdded the option to pass the class parameter as a string. Added the autoload parameter.
 class_parentsAdded the option to pass the class parameter as a string. Added the autoload parameter.
 date_sunriseOra emette gli errori time zone E_STRICT e E_NOTICE
 date_sunsetOra emette gli errori time zone E_STRICT e E_NOTICE
 file_put_contentsAdded support for LOCK_EX and the ability to pass a stream resource to the data parameter
 globGLOB_ERR was added
 idateOra emette gli errori time zone E_STRICT e E_NOTICE
 imagerotateignore_transparent was added.
 openssl_pkcs7_verifyThe content parameter was added.
 session_regenerate_idAdded the delete_old_session parameter.
 sha1_fileModificata la funzione per utilizzare lr API streams. Ciò significa che si può utlizzare la funzione con i vari warppers, tipo sha1_file('http://example.com/..')
 str_word_countAggiunto il parametro charlist
 stream_copy_to_streamAdded the offset parameter
 stream_filter_appendPrior to PHP 5.1.0, this function returns TRUE on success o FALSE in caso di fallimento.
 stream_filter_prependPrior to PHP 5.1.0, this function returns TRUE on success o FALSE in caso di fallimento.
 stream_get_contentsThe offset was added.
 var_exportPossibilità di esportare classi e array contenenti classi utilizzando il metodo magico __set_state().
 XSLTProcessor::registerPHPFunctionsThe restrict parameter was added.
5.0.5php_check_syntaxThis function was removed from PHP.
5.0.3php_check_syntaxCalling exit after php_check_syntax resulted in a Segfault.
5.0.1php_check_syntaxerror_message is passed by reference.
5.0.0apache_get_modulesBecame available when using Apache 1, or the PHP Apache 2 filter API. Before this time, it was only available when using the Apache 2 handler API.
 apache_get_versionBecame available with the Apache 2 filter API.
 emptyGli oggetti senza proprietà non sono più considerati vuoti.
 error_reportingInserita E_STRICT (non fa parte di E_ALL).
 file_put_contentsAdded context support
 get_defined_varsLa variabile $GLOBALS viene compresa nella matrice restituita.
 mb_encode_mimeheaderThe indent parameter was added.
 mb_send_mailThe Content-Type and Content-Transfer-Encoding headers may be redefined as of PHP 5.0.0. Before this time, the values defined by mb_language are always used.
 opendirpath accetta il wrapper URL ftp:// .
 openssl_pkcs7_encryptThe cipherid parameter was added.
 openssl_signThe signature_alg parameter was added.
 proc_openAdded the cwd, env and other_options parameters.
 sha1_fileAggiunto il parametro raw_output.
 stream_get_meta_dataThe following entries were added in the returned array: mode, seekable, and uri.
 uniqidThe prefix parameter was made optional.
 usleepThis function now works on Windows systems.
 mysqli_result::fetch_objectAdded the ability to return as a different object.
add a note add a note

User Contributed Notes

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