Backward Incompatible Changes
Although most existing PHP 5 code should work without changes, you should
pay attention to the following backward incompatible changes:
-
The internal parameter parsing API have been applied across all
the extensions that PHP 5.3.x comes with. This parameter parsing API
will make the function return NULL if incompatible parameters are
passed to the function. There are some exceptions to this, like the
get_class() will still return FALSE in case of an
error.
-
clearstatcache() no longer clears the realpath
cache by default.
-
realpath() is no longer system dependent and works the
same on all platforms.
-
call_user_func() and family now propagates $this
even if the callee is the parent class.
-
The array functions: natsort(), natcasesort(),
usort(), uasort(), uksort(),
array_flip() and array_unique(), no longer accept
objects passed as arguments. If you need to access their properties using an object,
you will need to cast the objects to arrays 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 using MySQL's newer 41 bytes password format.
Continued use of the old 16 bytes passwords will cause mysql_connect()
to produce the following error message: "mysqlnd cannot connect to MySQL 4.1+
using old authentication".
-
The trailing / has been removed from SplFileInfo and other related
directory classes.
-
The __toString magic method can
no longer accept arguments.
-
The magic methods
__get,
__set,
__isset,
__unset,
__call,
should always be public and can no longer be static. Method signatures are enforced.
-
The __call
magic method now gets invoked on private/protected method access.
The following keywords are now reserved and may not be used
in function, class etc. names.