After development of PHP 5.3.0 the next version should have been PHP 6.0 but due to some unicode problems it have been delayed. This latest version includes many of the features planned for version 6.0.
Any one can download PHP 5.4 from the php.net website. There’s a PHP 5.3 migration guide for those who want to keep their old settings.
So here are the best new features and improvements in PHP 5.4
Built-in Web Server: There is a built-in web server in PHP 5.4 which runs from the Windows, Mac or Linux command line. While it’s not Apache or IIS, it’s fine for simple testing.
New Commands: A number of effective commands have been implemented:
hextobin(string $hex): coverts a hex representation of data to binary.
http_response_code(int $code): allows you to set or get the HTTP response code, e.g. http_response_code(404);
header_register_callback(string $function): allows you to register a function which is called when PHP starts sending output.
trait_exists(string $name [,bool $autoload]): determines whether a trait exists and, optionally, whether it should be autoloaded.
Other Updates: Class members can be accessed on instantiation
Binary numbers can be declared, e.g. 0b11110000
For tracking the state of file uploads, session upload progress has been implemented .
Speed increases of up to 25% with a memory reduction of 35%.
Compatibility Issues: Safe mode, register_globals and magic quotes have been removed. get_magic_quotes_gpc() will always return FALSE.
trait, callable and instead of have become reserved words.
Several mysql aliases have been removed.