The following changes have been made to functions of bundled extensions.
Version | Function | Description |
---|---|---|
PHP 4.3.3 | ftruncate | Przed tym wydaniem ftruncate zwracała integer o wartości 1 w przypadku sukcesu, zamiast boolean TRUE. |
before 4.3.5 | dba_open | open mode "c" is broken for several internal handlers and truncates the database instead of appending data to an existent database. Also dbm and ndbm fail on mode "c" in typical configurations (this cannot be fixed). |
5.5.0 | empty | empty now supports expressions, rather than only variables. |
php_logo_guid | php_logo_guid has been removed from PHP. | |
preg_replace | The /e modifier is deprecated. Use preg_replace_callback instead. | |
zend_logo_guid | zend_logo_guid has been removed from PHP. | |
mysqli::options | The MYSQLI_SERVER_PUBLIC_KEY option was added. | |
5.4.8 | assert | The description parameter was added. The description is also now provided to a callback function in ASSERT_CALLBACK mode as the fourth argument. |
5.4.1 | hex2bin | A 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 | apache_request_headers | This function became available under FastCGI. Previously, it was supported only when PHP was installed as an Apache module. |
apache_response_headers | Ta funkcja stała się również dostępna w FastCGI. Poprzednio była ona obsługiwana tylko przez PHP zainstalowany jako moduł serwera Apache. | |
debug_backtrace | Added the optional parameter limit. | |
debug_print_backtrace | Added the optional parameter limit. | |
empty | Checking non-numeric offsets of strings returns TRUE. | |
error_reporting | E_STRICT became part of E_ALL. | |
get_html_translation_table | The constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
get_html_translation_table | The default value for the encoding parameter was changed to UTF-8. | |
get_magic_quotes_gpc | Always returns FALSE because the magic quotes feature was removed from PHP. | |
get_magic_quotes_runtime | Always returns FALSE because the magic quotes feature was removed from PHP. | |
gzencode | FORCE_DEFLATE now generates RFC 1950 compliant output. | |
html_entity_decode | Default encoding changed from ISO-8859-1 to UTF-8. | |
html_entity_decode | The constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
htmlentities | The default value for the encoding parameter was changed to UTF-8. | |
htmlentities | The constants ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
htmlspecialchars | The constants ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
htmlspecialchars | The default value for the encoding parameter was changed to UTF-8. | |
htmlspecialchars_decode | The constants ENT_HTML401, ENT_XML1, ENT_XHTML and ENT_HTML5 were added. | |
imagecolorset | The alpha parameter was added. | |
isset | Checking non-numeric offsets of strings now returns FALSE. | |
ob_start | A chunk size of 1 now results in chunks of 1 byte being sent to the output buffer. | |
preg_match_all | The matches parameter became optional. | |
snmp_set_valueretrieval | Constants 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. | |
SoapClient::SoapClient | New keep_alive option. | |
5.3.7 | crypt | Added $2x$ and $2y$ Blowfish modes to deal with potential high-bit attacks. |
5.3.6 | DOMDocument::saveHTML | The node parameter was added. |
debug_backtrace | The parameter provide_object changed to options and additional option DEBUG_BACKTRACE_IGNORE_ARGS is added. | |
debug_print_backtrace | Added the optional parameter options. | |
preg_match | Returns FALSE if offset is higher than subject length. | |
preg_match_all | Returns FALSE if offset is higher than subject length. | |
PDO_MYSQL DSN | Prior to version 5.3.6, charset was ignored. | |
5.3.4 | get_html_translation_table | The encoding parameter was added. |
sleep | Before PHP 5.3.4, on Windows, sleep always returns NULL when sleep has occurred, regardless of whether the sleep was interrupted or not. | |
5.3.3 | DOMXPath::evaluate | The registerNodeNS parameter was added. |
DOMXPath::query | The registerNodeNS parameter was added. | |
ldap_sasl_bind | Support on Windows was added. | |
openssl_decrypt | The iv parameter was added. | |
openssl_encrypt | The iv parameter was added. | |
5.3.2 (PECL OCI8 1.4) | oci_set_prefetch | Before this release, rows must be >= 1. |
5.3.2 | crypt | Added SHA-256 and SHA-512 crypt based on Ulrich Drepper's implementation. |
crypt | Fixed Blowfish behaviour on invalid rounds to return "failure" string ("*0" or "*1"), instead of falling back to DES. | |
flock | The automatic unlocking when the file's resource handle is closed was removed. Unlocking now always has to be done manually. | |
gmp_init | The base was extended from 2 to 36, to 2 to 62 and -2 to -36. | |
gmp_strval | The base was extended from 2 to 36, to 2 to 62 and -2 to -36. | |
imap_append | Added INTERNALDATE support to imap_append. | |
imap_open | params added | |
5.3.1 | get_defined_constants | Windows only: Core constants are categorized under Core, previously mhash. |
rename | rename can now rename files across drives in Windows. | |
5.3.0 (PECL OCI8 1.3.4) | oci_set_prefetch | Before 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.0 | DirectoryIterator::__construct | Throws UnexpectedValueException if the path cannot be opened. |
call_user_func | The 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_array | The 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. | |
checkdnsrr | This function is now available on Windows platforms. | |
clearstatcache | Dodano opcjonalne parametry clear_realpath_cache i filename. | |
copy | Dodano obsługę kontekstu. | |
crypt | PHP now contains its own implementation for the MD5 crypt, Standard DES, Extended DES and the Blowfish algorithms and will use that if the system lacks of support for one or more of the algorithms. | |
define_syslog_variables | This function now throws an E_DEPRECATED notice. | |
dl | dl is now disabled in some SAPIs due to stability issues. The only SAPIs that allow dl are CLI and Embed. Use the Extension Loading Directives instead. | |
dns_get_record | This function is now available on Windows platforms. | |
dns_get_record | Prior to this release, if the authns parameter was given, the addtl parameter was also required. | |
error_reporting | E_DEPRECATED and E_USER_DEPRECATED introduced. | |
fgetcsv | Dodano parametr ucieczka | |
fnmatch | This function is now available on Windows platforms. | |
func_get_arg | If 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_arg | This function can now be used in parameter lists. | |
func_get_args | If 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_args | This function can now be used in parameter lists. | |
func_num_args | If 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_args | This function can now be used in parameter lists. | |
gd_info | JPG Support attribute renamed to JPEG Support. | |
get_cfg_var | get_cfg_var was fixed to be able to return "array" ini options. | |
get_defined_constants | Core constants are categorized under Core, previously internal. On Windows, the Core Constants are categorized under mhash. | |
getimagesize | Added icon support. | |
getmxrr | This function is now available on Windows platforms. | |
getopt | Added support for "=" as argument/value separator. | |
getopt | Added support for optional values (specified with "::"). | |
getopt | This function is no longer system dependent, and now works on Windows, too. | |
getopt | Parameter longopts is available on all systems. | |
htmlentities | The constant ENT_IGNORE was added. | |
htmlspecialchars | The constant ENT_IGNORE was added. | |
imagecolorclosesthwb | This function is now available on Windows | |
imagefilter | Pixelation support (IMG_FILTER_PIXELATE) was added. | |
inet_ntop | This function is now available on Windows platforms. | |
inet_pton | This function is now available on Windows platforms. | |
ini_get_all | Added details. | |
mb_get_info | The entry "http_output_conv_mimetypes" was made available. | |
mcrypt_create_iv | MCRYPT_DEV_RANDOM and MCRYPT_DEV_URANDOM became available on Windows platforms. | |
mcrypt_create_iv | It is no longer required to call srand first. This is now done automatically. | |
nl2br | Added the optional is_xhtml parameter. | |
parse_ini_file | Added optional scanner_mode parameter. Single quotes may now be used around variable assignments. Hash marks (#) may no longer be used as comments and will throw a deprecation warning if used. | |
preg_quote | The - character is now quoted | |
realpath | Prior to this release, if only the last path component did not exist, realpath would not fail on *BSD systems. realpath now fails in this case. | |
register_tick_function | Ticks are now supported on threaded web server modules. | |
setlocale | This function now throws an E_DEPRECATED notice if a string is passed to the category parameter instead of one of the LC_* constants. | |
shm_attach | This function now returns a zasób instead of an integer. | |
socket_create_pair | This function is now re-enabled on Windows platforms. | |
spl_autoload_register | Namespaces support was introduced. | |
spl_autoload_register | The prepend parameter was added. | |
stream_context_create | Added the optional params argument. | |
stream_socket_pair | This function is now available on Windows platforms. | |
stristr | Added the optional parameter before_needle. | |
strlen | Prior versions treated arrays as the string Array, thus returning a string length of 5 and emitting an E_NOTICE level error. | |
strstr | Added the optional parameter before_needle. | |
sybase_connect | The new parameter was added. | |
time_nanosleep | This function is now available on Windows platforms. | |
time_sleep_until | This function is now available on Windows platforms. | |
touch | Możliwa jest zmiana czasu modyfikacji katalogu pod Windows. | |
mysqli::__construct | Added the ability of persistent connections. | |
mysqli::query | Added the ability of async queries. | |
ReflectionFunction::__construct | name can now be a closure. | |
SplObjectStorage::attach | Added the data parameter. | |
5.2.15 & 5.3.4 | mysqli_report | Changing the reporting mode is now be per-request, rather than per-process. |
5.2.11 | get_defined_constants | The categorize parameter now operates appropriately. Previously, the categorize parameter was interpreted as !is_null($categorize), making any value other than NULL force the constants to be categorized. |
5.2.10 | curl_setopt | Introduced CURLOPT_PROTOCOLS, and CURLOPT_REDIR_PROTOCOLS. |
ip2long | Prior to this version, ip2long would sometimes return a valid number even if passed an value which was not an (IPv4) Internet Protocol dotted address. | |
5.2.8 | XSLTProcessor::importStylesheet | Accepts SimpleXMLElement again which was broken since PHP 5.2.6. |
5.2.7 | error_log | The possible value of 4 was added to message_type. |
parse_ini_file | On syntax error this function will return FALSE rather than an empty array. | |
5.2.5 | addcslashes | The escape sequences \v and \f were added. |
debug_backtrace | Added the optional parameter provide_object. | |
imagefilter | Alpha support for IMG_FILTER_COLORIZE was added. | |
5.2.4 | checkdnsrr | TXT type was added. |
get_loaded_extensions | The optional zend_extensions parameter was added | |
ldap_first_attribute | The ber_identifier was removed. This is now handled automatically by PHP. | |
ldap_next_attribute | The ber_identifier was removed. This is now handled automatically by PHP. | |
parse_ini_file | Keys and section names consisting of numbers are now evaluated as PHP integers thus numbers starting by 0 are evaluated as octals and numbers starting by 0x are evaluated as hexadecimals. | |
stream_wrapper_register | Added the flags parameter. | |
5.2.3 | getimagesize | Read errors generated by this function downgraded to E_NOTICE from E_WARNING. |
htmlentities | The double_encode parameter was added. | |
htmlspecialchars | The double_encode parameter was added. | |
XMLWriter::writeElement | The content parameter became optional. | |
XMLWriter::writeElementNS | The content parameter became optional. | |
PDOStatement::getColumnMeta | table field | |
5.2.2 - 5.2.6 | substr | If the start parameter indicates the position of a negative truncation or beyond, false is returned. Other versions get the string from start. |
5.2.2 | DOMDocument::registerNodeClass | Prior to 5.2.2, a previously registered extendedclass had to be unregistered before being able to register a new class extending the same baseclass. |
ftp_ssl_connect | The function was changed to return FALSE when it can't use an SSL connection, instead of fallbacking to a non-SSL one as previously. | |
phpinfo | The "Loaded Configuration File" information was added, when before only "Configuration File (php.ini) Path" existed. | |
preg_match | Named subpatterns now accept the syntax (?<name>) and (?'name') as well as (?P<name>). Previous versions accepted only (?P<name>). | |
preg_match_all | Named subpatterns now accept the syntax (?<name>) and (?'name') as well as (?P<name>). Previous versions accepted only (?P<name>). | |
proc_terminate | Previous versions used to destroy the given process resource. | |
5.2.1 | iterator_to_array | The use_keys parameter was added. |
memory_get_peak_usage | Compiling with --enable-memory-limit is no longer required for this function to exist. | |
memory_get_usage | Compiling with --enable-memory-limit is no longer required for this function to exist. | |
proc_open | Added the bypass_shell option to the other_options parameter. | |
5.2.0 | curl_multi_info_read | msgs_in_queue was added. |
error_reporting | E_RECOVERABLE_ERROR introduced. | |
imagettftext | It is now possible to specify an hexadecimal entity in text. | |
imap_open | n_retries added | |
imap_reopen | n_retries added | |
mb_strrpos | Added the optional parameter offset. | |
memory_get_peak_usage | real_usage was added. | |
memory_get_usage | real_usage was added. | |
openssl_verify | The signature_alg parameter was added. | |
pathinfo | Została dodana stała PATHINFO_FILENAME. | |
set_error_handler | The error handler must return FALSE to populate $php_errormsg. | |
setcookie | The httponly parameter was added. | |
setrawcookie | The httponly parameter was added. | |
snmp_set_oid_numeric_print | Since PHP 5.2.0. | |
PDOStatement::execute | The keys from input_parameters must match the ones declared in the SQL. Before PHP 5.2.0 this was silently ignored. | |
SimpleXMLElement::children | The optional parameter is_prefix was added. | |
SimpleXMLElement::__construct | Added the ns and is_prefix parameters. | |
SoapServer::SoapServer | Added the typemap option. | |
SWFMovie::streamMP3 | skip added | |
XMLReader::open | encoding and options were added. | |
XMLReader::XML | encoding and options were added. | |
5.1.3 | DirectoryIterator::__construct | Throws RuntimeException if the path is an empty string. |
curl_getinfo | Introduced CURLINFO_HEADER_OUT. | |
imagecolorallocate | Returns FALSE if the allocation failed. Previously -1 was returned. | |
imagecolorallocatealpha | Returns FALSE if the allocation failed. Previously -1 was returned. | |
imagepng | Added the filters parameter. | |
mb_get_info | The entries "mail_charset", "mail_header_encoding", and "mail_body_encoding" were made available. | |
SoapClient::__doRequest | The one_way parameter was added. | |
XMLReader::getAttribute | Return NULL if no attribute found. Previously, returned an empty string. | |
5.1.2 | imagepng | Added the quality parameter. |
SimpleXMLElement::__construct | Added the options and data_is_url parameters. | |
5.1.1 | debug_backtrace | Added the current object as a possible return element. |
5.1.0 | DirectoryIterator::__construct | Throws RuntimeException on error. Previously, threw Exception. |
DOMDocument::save | Added the options parameter | |
DOMDocument::saveXML | Added the options parameter | |
class_implements | Added the option to pass the class parameter as a string. Added the autoload parameter. | |
class_parents | Added the option to pass the class parameter as a string. Added the autoload parameter. | |
ctype_digit | Before PHP 5.1.0, this function returned TRUE when text was an empty string. | |
curl_setopt | Introduced CURLOPT_AUTOREFERER, CURLOPT_BINARYTRANSFER, CURLOPT_FTPSSLAUTH, CURLOPT_PROXYAUTH, and CURLOPT_TIMECONDITION. | |
explode | Support for negative limits was added | |
file_get_contents | Added the offset and maxlen parameters. | |
file_put_contents | Added support for LOCK_EX and the ability to pass a stream resource to the data parameter | |
glob | GLOB_ERR was added | |
imagerotate | ignore_transparent was added. | |
intval | Throws E_NOTICE and returns 1, when an object is passed to var. | |
md5_file | Changed the function to use the streams API. It means that you can use it with wrappers, like md5_file('http://example.com/..') | |
openssl_pkcs7_verify | The content parameter was added. | |
preg_replace | Added the count parameter | |
preg_replace_callback | The count parameter was added | |
session_regenerate_id | Dodano parametr usunięcie_starej_sesji. | |
sha1_file | Changed the function to use the streams API. It means that you can use it with wrappers, like sha1_file('http://example.com/..') | |
sqlite_exec | Added the error_msg parameter | |
sqlite_fetch_column_types | Added result_type | |
sqlite_query | Added the error_msg parameter | |
sqlite_unbuffered_query | Added the error_msg parameter | |
str_word_count | Added the charlist parameter | |
stream_copy_to_stream | Added the offset parameter | |
stream_filter_append | Prior to PHP 5.1.0, this function returns TRUE on success lub FALSE w przypadku niepowodzenia. | |
stream_filter_prepend | Prior to PHP 5.1.0, this function returns TRUE on success lub FALSE w przypadku niepowodzenia. | |
stream_get_contents | The offset was added. | |
substr_compare | Added the possibility to use a negative offset. | |
substr_count | Added the offset and the length parameters | |
var_export | Possibility to export classes and arrays containing classes using the __set_state() magic method. | |
XSLTProcessor::registerPHPFunctions | The restrict parameter was added. | |
5.0.5 | php_check_syntax | This function was removed from PHP. |
5.0.3 | php_check_syntax | Calling exit after php_check_syntax resulted in a Segfault. |
5.0.1 | php_check_syntax | error_message is passed by reference. |
5.0.0 | apache_get_modules | Became 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_version | Became available with the Apache 2 filter API. | |
cal_info | The calendar parameter becomes optional and defaults to "all calendars" if omitted. | |
checkdnsrr | AAAA type was added. | |
com_release | This function was removed. | |
curl_setopt | Introduced CURLOPT_FTP_USE_EPRT, CURLOPT_NOSIGNAL, CURLOPT_UNRESTRICTED_AUTH, CURLOPT_BUFFERSIZE, CURLOPT_HTTPAUTH, CURLOPT_PROXYPORT, CURLOPT_PROXYTYPE, CURLOPT_SSLCERTTYPE, and CURLOPT_HTTP200ALIASES. | |
dirname | dirname od teraz jest binarnie bezpieczna | |
empty | Objects with no properties are no longer considered empty. | |
error_reporting | E_STRICT introduced (not part of E_ALL). | |
extension_loaded | extension_loaded uses the internal extension name to test whether a certain extension is available or not. Most internal extension names are written in lower case but there may be extensions available which also use uppercase letters. Prior to PHP 5, this function compared the names case sensitively. | |
fgetss | Parametr długość jest opcjonalny. | |
file_get_contents | Added context support. | |
file_put_contents | Added context support | |
get_defined_constants | The categorize parameter was added. | |
get_defined_vars | The $GLOBALS variable is included in the results of the array returned. | |
html_entity_decode | Support for multi-byte encodings was added. | |
ip2long | Prior to this version, ip2long returned -1 on failure. | |
jdtojewish | The fl parameter was added. | |
mb_encode_mimeheader | The indent parameter was added. | |
mb_send_mail | The 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. | |
md5 | The raw_output parameter was added. | |
md5_file | Added the raw_output parameter | |
openssl_pkcs7_encrypt | The cipherid parameter was added. | |
openssl_sign | The signature_alg parameter was added. | |
parse_ini_file | Values enclosed in double quotes can contain new lines. | |
proc_open | Added the cwd, env and other_options parameters. | |
realpath | Prior to this release, a blank or NULL path would cause realpath to return the directory name of the script. | |
rename | rename can now also be used with some URL wrappers. Refer to for a listing of which wrappers support rename. | |
set_error_handler | The error_types parameter was introduced. | |
sha1 | The raw_output parameter was added. | |
sha1_file | Added the raw_output parameter | |
socket_create | The AF_INET6 constant was added. | |
str_ireplace | The count parameter was added. | |
str_replace | The count parameter was added. | |
stream_get_meta_data | The following entries were added in the returned array: mode, seekable, and uri. | |
strip_tags | strip_tags is now binary safe. | |
uniqid | The prefix parameter was made optional. | |
unlink | Od PHP 5.0.0 unlink może być również użyty z niektórymi osłonami (wrapperami) URL. Zajrzyj do aby uzyskać listę wrapperów, które obsługuje unlink. | |
usleep | This function now works on Windows systems. | |
mysqli_result::fetch_object | Added the ability to return as a different object. |