PHP 5.4 Changes
From the PHP 5.4.0 RC1 "NEWS" file.
- Traits
- Class member access on instantiation:
(new Foo)->bar() - Short array syntax:
['blue', 'red'] - ext/mysql, mysqli and pdo_mysql now use mysqlnd by default
- New typehint:
function( callable $callback ) Closure::bind()andClosure::bindTo()Class::{"foo$bar"}()- Method call through array:
$cb = array($obj, 'method'); $cb( $args ); - Built-in web server:
php -S localhost:8080 <?=is now always available regardless of the short_open_tag setting (pure PHP templates ftw)
In addition to safe mode being removed, there's also this:
Removed
magic_quotes_gpc,magic_quotes_runtimeandmagic_quotes_sybaseini options.get_magic_quotes_gpc,get_magic_quotes_runtimeare kept but always return false,set_magic_quotes_runtimeraises anE_CORE_ERROR. (Pierrick, Pierre)