The process to release PHP 5.4 is moving on.

As you probably know, the updates that were intended for postponed PHP 6 were added to PHP 5.4.0 instead, so now PHP includes a huge set of new language features and removes several legacy behaviors.

Because of that I created a list of major changes since PHP 5.3 ,along with some examples and brief descriptions of these changes…

Major PHP improvements

Changes since PHP 5.3 version include:

  1. Added class member access on instantiation.
  2. Added callable typehint.
  3. Added closure rebinding as parameter to bindTo.
  4. Added short array syntax.
  5. Added binary value format.
  6. Added support for Class::{expr}() syntax.
  7. Added support for Traits.
  8. Added closure $this support back.
  9. Added array dereferencing support.
  10. Added indirect method call through array.
  11. Changed $GLOBALS into a JIT autoglobal.
  12. Improved performance of @ (silence) operator.
  13. Added multibyte support by default.
  14. Added built-in web server that is intended for testing purpose.
  15. Lots of performance and memory usage improvements

Removed major PHP features

  1. Removed break/continue $var syntax.You can no longer use variable to tell PHP how many levels of enclosing loops it should skip to the end of.
  2. Removed safe mode and all related ini options.Functionality described in this article and marked as depreciated in PHP 5.3 has now been removed
  3. Removed register_globals and register_long_arrays ini options.If enabled, register_globals injected PHP scripts with all sorts of variables, like request variables from HTML forms or values from GET requests. Now, every request/environment variable must be fetched from an appropriate PHP array.
  4. Removed allow_call_time_pass_reference option.Passing arguments by reference at function call time was deprecated for code-cleanliness reasons. A function can modify its arguments in an undocumented way if it didn’t declare that the argument shall be passed by reference. To prevent side-effects it’s better to specify which arguments are passed by reference in the function declaration only.

Related Posts