Big hitters: array dereferencing - $object->method()[$index] is now valid syntax built-in webserver via CLI - php -s - http://php.net/manual/en/features.commandline.webserver.php traits and the insteadof operator - http://php.net/language.oop5.traits.php shortened array syntax - $array = [1, 2, [1, 2, 3], 4]; Finally removed register_globals ;) Default charset of UTF-8! Read all about it! http://www.php.net/manual/en…
PHP 5.4.0 released
61–70 of 103 posts
Re: PHP 5.4.0 released
#62Big hitters: array dereferencing - $object->method()[$index] is now valid syntax built-in webserver via CLI - php -s - http://php.net/manual/en/features.commandline.webserver.php traits and the insteadof operator - http://php.net/language.oop5.traits.php shortened array syntax - $array = [1, 2, [1, 2, 3], 4]; Finally removed register_globals ;) Default charset of UTF-8! Read all about it! http://www.php.net/manual/en…
I just did a Google search for register_globals... mind boggling.
Re: PHP 5.4.0 released
#63Big hitters: array dereferencing - $object->method()[$index] is now valid syntax built-in webserver via CLI - php -s - http://php.net/manual/en/features.commandline.webserver.php traits and the insteadof operator - http://php.net/language.oop5.traits.php shortened array syntax - $array = [1, 2, [1, 2, 3], 4]; Finally removed register_globals ;) Default charset of UTF-8! Read all about it! http://www.php.net/manual/en…
I just did a Google search for register_globals... mind boggling.
Re: PHP 5.4.0 released
#64Re: PHP 5.4.0 released
#65Re: PHP 5.4.0 released
#66finally ....
Re: PHP 5.4.0 released
#67array dereferencing - $object->method()[$index] is now valid syntax finally ....
Re: PHP 5.4.0 released
#68This is a nice list of improvements. As someone who spends a lot of the day in PHP-land, this is going to make me happy. As someone who also controls our entire server stack, waiting for someone else to decide to upgrade will not be a problem :) I'm glad the PHP devs are starting to actually make it a "real" language. It seems like PHP has always been the fat kid bumbling along behind everyone shouting "wait up guys!…
> waiting for someone else to decide to upgrade will not be a problem :) It is sad that a lot of servers are not like this, and PHP 5.4 will take ages to appear, if at all. Heck, I know of a hosting company still using PHP4.
Re: PHP 5.4.0 released
#69Big hitters: array dereferencing - $object->method()[$index] is now valid syntax built-in webserver via CLI - php -s - http://php.net/manual/en/features.commandline.webserver.php traits and the insteadof operator - http://php.net/language.oop5.traits.php shortened array syntax - $array = [1, 2, [1, 2, 3], 4]; Finally removed register_globals ;) Default charset of UTF-8! Read all about it! http://www.php.net/manual/en…
I am curious what the internal hang up is which prevents: funcReturnsFunc(1)(2)
PHP's parser is... not exactly a great work of software engineering.
Re: PHP 5.4.0 released
#70I'm glad to see the short array syntax. Having strayed from PHP for a while to work on Ruby and JavaScript I'm really enjoying the ability to leave out semicolons in unambiguous end-of-line situations. Would love to see that make it into PHP at some point.
The best part of short array syntax is that now you don't need named parameters to be supported by the language. function foo($opts) { echo $opts['source'] . $opts['destination']; } // just one extra pair of [] needed instead of new array() foo(['source' => '/123', 'destination' => '/abc']);
Unless you've ever used languages with actual first-class keyword arguments (Python) and languages using hashes as pseudo-kwargs (Ruby, JavaScript). Then you know it's no substitute.
Also, you could already do just that in PHP before, it simply took 5 more characters.