Live data from Hacker News

PHP 5.4.0 released

php.net

101–103 of 103 posts

Re: PHP 5.4.0 released

#101
post #84

Earlier quoted context omitted.

> I am curious what the internal hang up is which prevents: PHP's parser is... not exactly a great work of software engineering.

> PHP is... not exactly a great work of software engineering. FTFY. :)

You can do better? As smart man as you are surely can figure out where to send the patches.

Re: PHP 5.4.0 released

#102

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…

I am curious what the internal hang up is which prevents: funcReturnsFunc(1)(2)

Main problem there is $foo→bar()() which seems to be harder to implement on top of existing parser. Otherwise the patch is here: https://wiki.php.net/rfc/fcallfcall but since it's not complete it wasn't merged.

Re: PHP 5.4.0 released

#103
post #89

Earlier quoted context omitted.

Well, it wasn't a bug. That was more of a feature request which is now implemented.

It’s been a feature request for at least eight years, it should never have arisen in the first place, and it should have been a one-line fix even if it had arisen. I don’t mean to knock PHP too badly; it’s quite useful, even if it is rather quirky. I just find it so unfortunate that this silly thing got so out of hand.

It's not "one liner", and couldn't be if you understand how PHP engine works. But it wasn't super-hard to implement, just nobody got to it till now.

It did not "get out of hand" by any measure. Once there was a consensus that this feature is needed by the significant part of PHP community, it was implemented. Could it be done earlier? Maybe, so could a lot of other nice things.

Post reply on HN