Latest news in php – What is new in PHP 5.3
Nov 20, 2009 Php
This release of PHP 5.3 is a major improvement in the 5.X series, which includes a large number of new features and bug fixes.
The key features of PHP 5.3.0 include:
* Support for namespaces
* Late static binding
* Lambda Functions and Closures
* Syntax additions: NOWDOC, ternary short cut “?:” and jump label (limited goto), __callStatic()
* Under the hood performance improvements
* Optional garbage collection for cyclic references
* Optional mysqlnd PHP native replacement for libmysql
* Improved Windows support including VC9 and experimental X64 binaries as well as portability to other supported platforms
* More consistent float rounding
* Deprecation notices are now handled via E_DEPRECATED (part of E_ALL) instead of the E_STRICT error level
* Several enhancements to enable more flexiblity in php.ini (and ini parsing in general)
* New bundled extensions: ext/phar, ext/intl, ext/fileinfo, ext/sqlite3, ext/enchant
* Over 140 bug fixes and improvements to PHP, in particular to: ext/openssl, ext/spl and ext/date
* Namespaces for classes and functions
* MySQL Native Driver
* phar – PHp ARchive :- This is a cool new feature. Think of it like an archive, like a .zip file or a .tar file. Besides just being able to group all the files into one simple file, we will be able to deliver and run an entire PHP application from a single file! We will also be able to use phar archives within PHP, so the following will work in PHP 5.3 and above view plaincopy to clipboardprint?
<?php
include “singlefilelibrary.phar”
?>
* Closures & Lambdas
<?php
$hellolambda = function () {
echo “Hello world via Lambda”;
}
$hellolambda(); // Outputs Hello world via Lambda
?>
*Functors: This allows an object to be invoked as a function.
*Traits: This is a new unit of reuse, traits can be incomplete, provides reusability, modularity and structure. In short it is copy-paste glorified!
*Magic functions: We have a couple of new magic functions for classes (interceptors) __callstatic() and invoke()
*Ternary operator: You can now display the a value that exists $value1 or $value2 using this simple statement echo $value1?:$value2;
There are many more things added like Late Static Binding, Variable Static Calls, Changes to PHP Error Levels, new PHP functions, improvements to help with OpenID, Command line and many more.
Tags: bug fixes, Class Constants, features, function, improvement, latest development, Latest news, Letest Announcement, migration, Mysql, Namespace Aliases, namespaces, Php, PHP 5.3, static binding, use Keyword
Leave a Reply