php-src/UPGRADING

356 lines
11 KiB
Plaintext
Raw Normal View History

2005-11-23 15:01:54 +00:00
$Id$
2010-03-24 16:23:50 +00:00
UPGRADE NOTES - PHP X.Y
1. Changes made to default configuration
2. Reserved words and classes
3. Changes made to existing functions
4. Changes made to existing methods
5. Changes made to existing classes
6. Deprecated
7. Removed
8. Extensions:
a. moved out to PECL and actively maintained there
b. no longer maintained
c. with changed behaviour
d. no longer possible to disable
9. Changes in SAPI support
10. Changes in INI directives
2010-09-01 10:22:29 +00:00
11. Syntax additions
12. Syntax additions
13. Windows support
14. New in PHP X.Y:
a. New libraries
b. New extensions
c. New stream wrappers
2009-06-24 21:16:53 +00:00
d. New stream filters
e. New functions
f. New global constants
g. New classes
h. New methods
i. New class constants
2010-03-24 16:23:50 +00:00
j. New hash algorithms
2010-03-24 16:23:50 +00:00
========================================
1. Changes made to default configuration
========================================
2009-06-24 21:16:53 +00:00
2010-03-24 16:23:50 +00:00
- The default_charset setting now defaults to UTF-8.
It was ISO-88590-1 before, so if you were relying
on the default, you will need to add:
2009-06-14 19:15:57 +00:00
2010-03-24 16:23:50 +00:00
default_charset = iso-8859-1
to your php.ini to preserve pre-PHPX.Y behavior.
- We now check at compile time if /dev/urandom or /dev/arandom
are present to provide non-blocking entropy to session id
generation. If either is present, session.entropy_file
now defaults to that file and session.entropy_length defaults
to 32. If you do not want extra entropy for your session ids
for some reason, add:
session.entropy_file=
session.entropy_length=0
to your php.ini to preserve pre-PHPX.Y behavior.
- Deprecated ini directives will now throw an E_CORE_WARNING's
instead of the previous E_WARNING's.
The following directives are marked as deprecated:
- magic_quotes_gpc
- magic_quotes_runtime
- magic_quotes_sybase
- The following directives, which indicates a removed feature
in PHP will now throw an E_CORE_ERROR upon startup like the
deprecation warnings.
The following directives are no longer available:
- allow_call_time_pass_reference
- define_syslog_variables
- highlight.bg
- register_globals
- register_long_arrays
- safe_mode
- safe_mode_gid
- safe_mode_include_dir
- safe_mode_exec_dir
- safe_mode_allowed_env_vars
- safe_mode_protected_env_vars
- zend.ze1_compatibility_mode
2010-03-24 16:23:50 +00:00
=============================
2. Reserved words and classes
=============================
2010-03-24 16:23:50 +00:00
-
2010-03-24 16:23:50 +00:00
=====================================
3. Changes made to existing functions
=====================================
2009-06-25 18:01:08 +00:00
- array_combine now returns array() instead of FALSE when two empty arrays are
provided as parameters.
- Added an extra parameter to dns_get_record(), which allows requesting DNS
records by numeric type and makes the result include only the raw data of
the response.
- call_user_func_array no longer allows call-time pass by reference.
- htmlentities/htmlspecialchars are stricter in the code units they 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
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 0xFF are
rejected.
- htmlentities now emits an E_STRICT warning when used with asian characters,
as in that case htmlentities has (and already had before this version) the
same functionality as htmlspecialchars.
- htmlentities no longer numerically encodes high characters for single-byte
encodings (except when there's actually a corresponding named entity). This
behavior was not documented and was inconsistent with that for "UTF-8".
- html_entity_decode/htmlspecialchars_decode behave more consistently, now
decoding entities in malformed strings such as "&&" or "&#&".
- htmlentities/htmlspecialchars/html_entity_decode/htmlspecialchars_decode:
Added the flags ENT_HTML401, ENT_XML1, ENT_XHTML, and ENT_HTML5. The
behavior of these functions including, but not limited to, the characters
that are encoded and the entities that are decoded depend on the document
type that is specified by those flags.
- htmlentities/htmlspecialchars with !$double_encode do more strict 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 validity of
such numerical entity in the target document type is also checked. Named
entitities are checked for necessary existence in the target document type
instead of only checking whether they were constituted by alphanumeric
characters.
- The flag ENT_DISALLOWED was addded. In addition to the behavior described in
the item before, it also makes htmlentities/htmlspecialchars substitute
characters that appear literally in the argument string and which are not
allowed in the target document type with U+FFFD (UTF-8) or �.
- The flag ENT_SUBSTITUTE was added. This flag makes invalid multibyte
sequences be replaced by U+FFFD (UTF-8) or &#FFFD; by htmlspecialchars and
htmlentities. It is an alternative to the default behavior, which just
returns an empty string and to ENT_IGNORE, which is a security risk. The
behavior follows the recommendations of Unicode Technical Report #36.
- htmlspecialchars_decode/html_entity_decode now decode ' if the document
type is ENT_XML1, ENT_XHTML, or ENT_HTML5.
- number_format() no longer truncates multibyte decimal points and thousand
separators to the first byte.
- The third parameter ($matches) to preg_match_all() is now optional. If
omitted, the function will simply return the number of times the pattern was
matched in the subject and will have no other side effects.
- The second argument of scandir() now accepts SCANDIR_SORT_NONE (2) as a
possible value. This value results in scandir() performing no sorting: on
local filesystems, this allows files to be returned in native filesystem
order.
- stream_select() now preserves the keys of the passed array, be they numeric or
strings. This breaks code that iterated the resulting stream array using a
numeric index, but makes easier to identify which of the passed streams are
present in the result.
2009-06-25 18:01:08 +00:00
===================================
2010-03-24 16:23:50 +00:00
4. Changes made to existing methods
===================================
2010-03-24 16:23:50 +00:00
-
===================================
2010-03-24 16:23:50 +00:00
5. Changes made to existing classes
===================================
2010-03-24 16:23:50 +00:00
-
=============
2010-03-24 16:23:50 +00:00
6. Deprecated
=============
==========
7. Removed
==========
a. removed features
- register_globals
- register_long_arrays
- Safe mode
- Session extension bug compatibility mode
- y2k_compliance mode
b. removed ini directives
- define_syslog_variables
- register_globals
- register_long_arrays
- safe_mode
- safe_mode_gid
- safe_mode_include_dir
- safe_mode_exec_dir
- safe_mode_allowed_env_vars
- safe_mode_protected_env_vars
- session.bug_compat42
- session.bug_compat_warn
- y2k_compliance
c. removed functions
- define_syslog_variables()
- import_request_variables()
- session_is_registered()
- session_register()
- session_unregister()
- mysqli_bind_param() (alias of mysqli_stmt_bind_param())
- mysqli_bind_result() (alias of mysqli_stmt_bind_result())
- mysqli_client_encoding() (alias of mysqli_character_set_name())
- mysqli_fetch() (alias of mysqli_stmt_fetch())
- mysqli_param_count() (alias of mysqli_stmt_param_count())
- mysqli_get_metadata() (alias of mysqli_stmt_result_metadata())
- mysqli_send_long_data() (alias of mysqli_stmt_send_long_data())
- mysqli::client_encoding() (alias of mysqli::character_set_name)
- mysqli_stmt::stmt() (never worked/always throws, undocumented)
d. removed syntax
- break $var;
- continue $var;
=============
8. Extensions
=============
a. moved out to PECL and actively maintained there
2010-03-24 16:23:50 +00:00
-
b. no longer maintained
- ext/sqlite
c. with changed behaviour
2010-05-11 16:40:03 +00:00
- The session extension now can hook into the file upload feature
in order to provide upload progress information through session
variables.
d. no longer possible to disable
2010-03-24 16:23:50 +00:00
-
==========================
9. Changes in SAPI support
==========================
2010-11-17 14:08:39 +00:00
- The REQUEST_TIME value inside server now returns a floating point number
indicating the time with microsecond precision. All SAPIs providing this
2010-11-07 19:27:08 +00:00
value should be returning float and not time_t.
=============================
10. Changes in INI directives
=============================
2010-05-11 16:40:03 +00:00
- Added session.upload_progress.enabled, session.upload_progress.cleanup,
session.upload_progress.prefix, session.upload_progress.name,
session.upload_progress.freq, session.upload_progress.min_freq.
- Added zend.multibyte directive as a replacement of PHP compile time
configuration option --enable-zend-multibyte. Now ZE always contains code for
multibyte support, but may enable or disable it by zend.multibyte. It doesn't
make a lot of sense to enable this option without ext/mbstring, because the
most functionality is implemented by mbstrings callbacks.
- Added enable_post_data_reading, which is enable by default. When it's
disabled, the POST data is not read (and processed); the behavior is similar
to that of other request methods with body, like PUT. This allows reading the
raw POST data in multipart requests and read/process the POST data in a
stream fashion (through php://input), without having it copied in memory two/
three times.
====================
11. Syntax additions
====================
- Array dereferencing.
e.g.
foo()[0]
$foo->bar()[0]
===================
12. Windows support
===================
2010-09-01 10:23:58 +00:00
- is_link now works properly for symbolic links on Windows Vista
or later. Earlier systems do not support symbolic links.
===================
13. New in PHP X.Y:
===================
a. New libraries
2010-03-24 16:23:50 +00:00
-
b. New extensions
2010-03-24 16:23:50 +00:00
-
c. New stream wrappers
2010-03-24 16:23:50 +00:00
-
2009-06-23 19:40:31 +00:00
d. New stream filters
2010-03-24 16:23:50 +00:00
-
2009-06-23 19:40:31 +00:00
e. New functions
2010-03-24 16:23:50 +00:00
- Core:
2010-08-09 13:27:13 +00:00
- get_declared_traits()
- http_response_code()
2009-06-23 19:40:31 +00:00
f. New global constants
- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
- ENT_SUBSTITUTE
- ENT_ALLOWED
- ENT_HTML401
- ENT_XML1
- ENT_XHTML
- ENT_HTML5
- SCANDIR_SORT_ASCENDING
- SCANDIR_SORT_DESCENDING
- SCANDIR_SORT_NONE
2009-06-23 19:40:31 +00:00
g. New classes
2010-06-03 12:46:14 +00:00
- Reflection:
- ReflectionZendExtension
- Intl:
- Transliterator
2009-06-23 19:40:31 +00:00
h. New methods
- Reflection:
- ReflectionClass::isCloneable()
- ReflectionClass::getTraits()
- ReflectionClass::getTraitNames()
- ReflectionClass::getTraitAliases()
- ReflectionParameter::canBePassedByValue()
- PDO_dblib
- PDO::newRowset()
- SplFileObject
- SplFileObject::fputcsv()
2009-06-23 19:40:31 +00:00
i. New class constants
2010-03-24 16:23:50 +00:00
-
j. New Hash algorithms
- fnv132
- fnv164
- joaat