New features
PHP 5.3.0 contains a wide set of new features, below lists new features
available to the language and syntax.
-
Support for namespaces has been
added.
-
Support for Late Static Bindings
has been added.
-
Support for a jump label (limited goto)
has been added.
-
Support for native Closures
(Lambda/Anonymous functions) has been added.
-
There are two new magic methods:
__callStatic and
__invoke has been added.
-
Nowdoc syntax is now
supported, and works like Heredoc
but with single quotes.
-
It's now possible to use Heredoc
to initialize static variables and class members/constants.
-
Heredoc syntax may now be declared
using double quotes.
-
Constants can now be declared outside a class
declaring using the const keyword.
-
The ternary operator
now have a shorthand operator ?:.
-
The HTTP stream wrapper now considers all status codes from 200 to 399 to
be successful.
-
Dynamic access to static methods is now possible.
-
Exceptions can now be nested.
-
Gargbage collector has been added and enabled by default.