Backward Incompatible Changes
Although most existing PHP 5 code should work without changes, please take
note of some backward incompatible changes:
-
The newer internal parameter parsing API has been applied across all the
extensions bundled with PHP 5.3.x. This parameter parsing API causes
functions to return NULL when passed incompatible parameters. There are
some exceptions to this rule, such as the get_class()
function, which will continue to return FALSE on error.
-
clearstatcache() no longer clears the realpath cache by
default.
-
realpath() is now fully platform-independent.
-
The call_user_func() family of functions now propagate
$this even if the callee is a parent class.
-
The array functions natsort(),
natcasesort(), usort(),
uasort(), uksort(),
array_flip(), and array_unique() no
longer accept objects passed as arguments. To apply these functions to an
object, cast the object to an array first.
-
The behaviour of functions with by-reference parameters called by value has
changed. Where previously the function would accept the by-value argument,
a warning is now emitted and all by-ref parameters are set to NULL.
-
The new mysqlnd library necessitates the use of MySQL 4.1's newer 41-byte
password format. Continued use of the old 16-byte passwords will cause
mysql_connect() and similar functions to emit the error,
"mysqlnd cannot connect to MySQL 4.1+ using old
authentication."
-
The trailing / has been removed from the SplFileInfo
class and other related directory classes.
-
The __toString magic
method can no longer accept arguments.
-
The magic methods
__get,
__set,
__isset,
__unset, and
__call must always
be public and can no longer be static. Method signatures are now enforced.
-
The __call
magic method is now invoked on access to private and protected methods.
The following keywords are now reserved and may not be used in function,
class, etc. names.