|
version 1.1.1.2, 2012/05/29 12:34:34
|
version 1.1.1.3, 2013/07/22 01:31:37
|
|
Line 37 PHP 5.4 UPGRADE NOTES
|
Line 37 PHP 5.4 UPGRADE NOTES
|
| ============================= |
============================= |
| |
|
| - PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom |
- PHP 5.4 now checks at compile time if /dev/urandom or /dev/arandom |
| are present. If either is available, session.entropy_file now | are present. If either is available, session.entropy_file now |
| defaults to that file and session.entropy_length defaults to 32. |
defaults to that file and session.entropy_length defaults to 32. |
| This provides non-blocking entropy to session id generation. If you | This provides non-blocking entropy to session id generation. If you |
| do not want extra entropy for your session ids, add: |
do not want extra entropy for your session ids, add: |
| |
|
| session.entropy_file= |
session.entropy_file= |
|
Line 89 PHP 5.4 UPGRADE NOTES
|
Line 89 PHP 5.4 UPGRADE NOTES
|
| session.upload_progress.min_freq |
session.upload_progress.min_freq |
| |
|
| - Added a zend.multibyte directive as a replacement of the PHP compile time |
- Added a zend.multibyte directive as a replacement of the PHP compile time |
| configuration option --enable-zend-multibyte. Now the Zend Engine always | configuration option --enable-zend-multibyte. Now the Zend Engine always |
| contains code for multibyte support, which can be enabled or disabled at |
contains code for multibyte support, which can be enabled or disabled at |
| runtime. Note: It doesn't make a lot of sense to enable this option if | runtime. Note: It doesn't make a lot of sense to enable this option if |
| ext/mbstring is not enabled, because most functionality is implemented by |
ext/mbstring is not enabled, because most functionality is implemented by |
| mbstrings callbacks. |
mbstrings callbacks. |
| |
|
|
Line 107 PHP 5.4 UPGRADE NOTES
|
Line 107 PHP 5.4 UPGRADE NOTES
|
| in a stream fashion (through php://input) without having it copied in memory |
in a stream fashion (through php://input) without having it copied in memory |
| multiple times. |
multiple times. |
| |
|
| - Added windows_show_crt_warning. This directive shows the CRT warnings when | - Added windows_show_crt_warning. This directive shows the CRT warnings when |
| enabled. These warnings were displayed by default until now. It is disabled |
enabled. These warnings were displayed by default until now. It is disabled |
| by default. |
by default. |
| |
|
|
Line 162 PHP 5.4 UPGRADE NOTES
|
Line 162 PHP 5.4 UPGRADE NOTES
|
| |
|
| - Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now |
- Non-numeric string offsets, e.g. $a['foo'] where $a is a string, now |
| return false on isset() and true on empty(), and produce warning if |
return false on isset() and true on empty(), and produce warning if |
| trying to use them. Offsets of types double, bool and null produce | trying to use them. Offsets of types double, bool and null produce |
| notice. Numeric strings ($a['2']) still work as before. |
notice. Numeric strings ($a['2']) still work as before. |
| |
|
| Note that offsets like '12.3' and '5 and a half' are considered |
Note that offsets like '12.3' and '5 and a half' are considered |
| non-numeric and produce warning, but are converted to 12 and 5 |
non-numeric and produce warning, but are converted to 12 and 5 |
| respectively for backwards compatibility reasons. |
respectively for backwards compatibility reasons. |
| |
|
| |
- Long numeric strings that do not fit in integer or double (such as |
| |
"92233720368547758070") are compared using string comparison if |
| |
they could otherwise result in precision loss - since 5.4.4. |
| |
|
| - Closures now support scopes and $this and can be rebound to |
- Closures now support scopes and $this and can be rebound to |
| objects using Closure::bind() and Closure::bindTo(). |
objects using Closure::bind() and Closure::bindTo(). |
| |
|
|
Line 178 PHP 5.4 UPGRADE NOTES
|
Line 182 PHP 5.4 UPGRADE NOTES
|
| - Parse error messages are changed to contain more information about |
- Parse error messages are changed to contain more information about |
| the error. |
the error. |
| |
|
| |
- __clone and __destruct since 5.4.4 follow the same scoping rules as |
| |
the rest of the methods (see bug #61782 for details). |
| |
|
| ================================ |
================================ |
| 4. Changes to existing functions |
4. Changes to existing functions |
| ================================ |
================================ |
|
Line 200 PHP 5.4 UPGRADE NOTES
|
Line 207 PHP 5.4 UPGRADE NOTES
|
| |
|
| - htmlentities() and htmlspecialchars() are stricter in the code units they |
- htmlentities() and htmlspecialchars() are stricter in the code units they |
| accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are |
accept for the asian encodings. For Big5-HKSCS, the octets 0x80 and 0xFF are |
| rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are | rejected. For GB2312/EUC-CN, the octets 0x8E, 0x8F, 0xA0 and 0xFF are |
| rejected. For SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected, |
rejected. For SJIS, the octets 0x80, 0xA0, 0xFD, 0xFE and 0xFF are rejected, |
| except maybe after a valid starting byte. For EUC-JP, the octets 0xA0 and |
except maybe after a valid starting byte. For EUC-JP, the octets 0xA0 and |
| 0xFF are rejected. |
0xFF are rejected. |
|
Line 226 PHP 5.4 UPGRADE NOTES
|
Line 233 PHP 5.4 UPGRADE NOTES
|
| checks on the validity of the entities. Numerical entities are checked for a |
checks on the validity of the entities. Numerical entities are checked for a |
| valid range (0 to 0x10FFFF); if the flag ENT_DISALLOWED is given, the |
valid range (0 to 0x10FFFF); if the flag ENT_DISALLOWED is given, the |
| validity of such numerical entity in the target document type is also |
validity of such numerical entity in the target document type is also |
| checked. Named entities are checked for necessary existence in the target | checked. Named entities are checked for necessary existence in the target |
| document type instead of only checking whether they were constituted by |
document type instead of only checking whether they were constituted by |
| alphanumeric characters. |
alphanumeric characters. |
| |
|
|
Line 332 PHP 5.4 UPGRADE NOTES
|
Line 339 PHP 5.4 UPGRADE NOTES
|
| - ob_start() no longer starts multiple output buffers when passed |
- ob_start() no longer starts multiple output buffers when passed |
| array("callback1", "callback2", "callback3", ...). |
array("callback1", "callback2", "callback3", ...). |
| |
|
| |
- Since 5.4.4, "php://fd" stream syntax is available only in CLI build. |
| |
|
| |
- Since 5.4.5, resourcebundle_create() accepts null for the first two arguments. |
| |
|
| |
- Since 5.4.6, SimpleXMLElement::getDocNamespaces() has and extra parameter which |
| |
allows for toggling if the list of namespaces starts from the document root |
| |
or from the node you call the method on |
| |
|
| |
- Since 5.4.7, ctor is always called when new user stream wrapper object is created. |
| |
Before, it was called only when stream_open was called. |
| |
|
| ============================== |
============================== |
| 5. Changes to existing classes |
5. Changes to existing classes |
| ============================== |
============================== |
|
Line 364 PHP 5.4 UPGRADE NOTES
|
Line 382 PHP 5.4 UPGRADE NOTES
|
| - FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use |
- FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator now use |
| the default stream context. |
the default stream context. |
| |
|
| |
- Since 5.4.5, the constructor of ResourceBundle accepts NULL for the first two |
| |
arguments. |
| |
|
| =========================== |
=========================== |
| 7. Deprecated Functionality |
7. Deprecated Functionality |
| =========================== |
=========================== |
|
Line 422 d. Removed hash algorithms
|
Line 443 d. Removed hash algorithms
|
| a. Extensions no longer maintained |
a. Extensions no longer maintained |
| |
|
| - ext/sqlite is no longer part of the base distribution and has been moved |
- ext/sqlite is no longer part of the base distribution and has been moved |
| to PECL. Use sqlite3 or PDO_SQLITE instead. | to PECL. Use sqlite3 or PDO_SQLITE instead. |
| |
|
| b. Extensions with changed behavior |
b. Extensions with changed behavior |
| |
|
|
Line 476 b. Extensions with changed behavior
|
Line 497 b. Extensions with changed behavior
|
| =========================== |
=========================== |
| |
|
| - A REQUEST_TIME_FLOAT value returns a floating point number indicating the |
- A REQUEST_TIME_FLOAT value returns a floating point number indicating the |
| time with microsecond precision. All SAPIs providing this value should be | time with microsecond precision. All SAPIs providing this value should be |
| returning float and not time_t. |
returning float and not time_t. |
| |
|
| - apache_child_terminate(), getallheaders(), apache_request_headers() |
- apache_child_terminate(), getallheaders(), apache_request_headers() |
|
Line 499 b. Extensions with changed behavior
|
Line 520 b. Extensions with changed behavior
|
| - is_link now works properly for symbolic links on Windows Vista |
- is_link now works properly for symbolic links on Windows Vista |
| or later. Earlier systems do not support symbolic links. |
or later. Earlier systems do not support symbolic links. |
| |
|
| |
- As of PHP 5.4.5 and above the COM extension isn't compiled statically in PHP |
| |
anymore but shared. It'll still be delivered with the standard PHP release but |
| |
must be activated manually with the "extension = php_com_dotnet.dll" directive |
| |
in php.ini. |
| |
|
| |
- Apache 2.4 handler is supported as of PHP 5.4.9 |
| |
|
| ================== |
================== |
| 12. New in PHP 5.4 |
12. New in PHP 5.4 |
| ================== |
================== |
|
Line 600 c. New functions
|
Line 628 c. New functions
|
| - mysqli: |
- mysqli: |
| - mysqli_error_list() |
- mysqli_error_list() |
| - mysqli_stmt_error_list() |
- mysqli_stmt_error_list() |
| |
|
| |
- pgsql |
| |
- pg_escape_identifier() (5.4.4) |
| |
- pg_escape_literal() (5.4.4) |
| |
|
| - Session: |
- Session: |
| - session_register_shutdown() |
- session_register_shutdown() |