Live data from Hacker News

PHP 5.4.0 released

php.net

81–90 of 103 posts

Re: PHP 5.4.0 released

#81
post #57

One thing that's pretty important too is PHP-FPM. I've been dreaming about this for a long time for my nginx deployments. http://php-fpm.org/

Hasn't PHP-FPM been part of the PHP core for a while now? Since 5.3.3 (mid 2010) according the PHP FPM site.

Yes but has of 5.4 it is now considered stable, whereas before it was still experimental (even tho it worked fine).

Re: PHP 5.4.0 released

#82
post #43

Earlier quoted context omitted.

> 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.

Hosting company that still uses PHP4? Name names so we can avoid and chastise them!

Media Temple for one. For a domain or subdomain you had to explicitly choose PHP5 instead of the default PHP4.

Re: PHP 5.4.0 released

#83
post #76

They also improved the zend engine, CURL extension, added Tokyo cabinet abstract and Berkeley DB Support! Added a couple of hashes, Improved JSON Extension (JSON_NUMERIC_CHECK!) and a whole lot of bug fixes. The UTF-8 part was long overdue, glad they fixed that. I spend a lot of time programming in PHP. Its reputation is pretty bad, but updates like this keep me going!

PHP was my first love (actually my second, after QBasic) when I was a teenager. Would love to get back into it now that it's a "real" language. Got any good tips about books on modern PHP programming?

Since you're not a beginner programmer, I recommend PHP Objects, Patterns and Practice

http://www.amazon.com/Objects-Patterns-Practice-Experts-Sour...

Re: PHP 5.4.0 released

#84

Earlier quoted context omitted.

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

> 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. :)

Re: PHP 5.4.0 released

#85

Earlier quoted context omitted.

Hosting company that still uses PHP4? Name names so we can avoid and chastise them!

Media Temple for one. For a domain or subdomain you had to explicitly choose PHP5 instead of the default PHP4.

They actually changed this recently. The default is now PHP5, with an option to select PHP4.

Re: PHP 5.4.0 released

#86
post #78
post #43

Earlier quoted context omitted.

> 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.

It's not really sad, some administrators don't like immediately upgrading to the latest and greatest version. Anyone running Debian stable will probably not get 5.4 until 2013.

I've booted up my home server after ~7 months of down time that has virtualized distros. It was funny to watch Debian 5 aptitude safe-upgrade ending in ~2 mins with less than 15 packages and Gentoo emerge -udNav world being busy nearly all night. That just displays two radically different philosophies and I have nothing against either, though I prefer to be up to date and flexible.

Re: PHP 5.4.0 released

#87
post #76

Earlier quoted context omitted.

PHP was my first love (actually my second, after QBasic) when I was a teenager. Would love to get back into it now that it's a "real" language. Got any good tips about books on modern PHP programming?

Books... not so much. I have another idea: you could check out an MVC-framework like codeigniter or CakePHP. There are numerous tutorials about them, and they give you the added benefit of working with an MVC pattern (knowledge you can use in other languages and frameworks as well, such as Ruby on Rails) and working Object Oriented. In my opinion, a big drawback of PHP is that it's so easy to screw up because it's ea…

CodeIgniter and CakePHP are great examples of code badly brought forward into PHP5 from PHP4 roots. I wouldn't recommend either to either a novice or an expert; CodeIgniter is a fantastic example of out-of-date practices and CakePHP an example of writing such abjectly slow code that everybody else benchmarks against you to look good.

If you're going to use PHP5, Symfony2 is a well-reasoned, best-of-breed system.

Re: PHP 5.4.0 released

#88
post #59

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…

That array syntax is beautiful, been waiting for that for a long time.

This bug was apparently “not a bug”: https://bugs.php.net/bug.php?id=51672

Re: PHP 5.4.0 released

#89
post #59

Earlier quoted context omitted.

That array syntax is beautiful, been waiting for that for a long time.

This bug was apparently “not a bug”: https://bugs.php.net/bug.php?id=51672

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

Re: PHP 5.4.0 released

#90
post #89

Earlier quoted context omitted.

This bug was apparently “not a bug”: https://bugs.php.net/bug.php?id=51672

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.
Post reply on HN