Page 1 of 4

PHP6 - A look ahead

Posted: Mon Mar 13, 2006 9:02 am
by Roja
There is a really solid summary of the changes coming in PHP6: http://jero.net/blog/2006/03/php6/

- Unicode
- No more register_globals, magic_quotes, safe_mode!
- No long arrays ($http_cookie_vars)
- APC cache included by default
- Namespaces
- Major changes to extensions

It looks like a breath of fresh air. Less legacy, smaller core (moving things out to extensions), and better functionality (unicode).

The internals list just started tackling the issue of the performance differences between php4.4 and 5.1 as well, so hopefully we will see performance improvements also.

Exciting stuff!

Posted: Mon Mar 13, 2006 9:41 am
by Chris Corbyn
Brilliant... I'm really looking forward to getting a copy and having a play around with the new OOP stuff. It'll be interesting to see how the namespace handling all works :)

Posted: Mon Mar 13, 2006 11:30 am
by feyd
sweeeeeeet sticky goo.... *gurgle*

Posted: Mon Mar 13, 2006 12:02 pm
by patrikG
proper unicode-support will make life so much easier...

Posted: Mon Mar 13, 2006 1:44 pm
by Maugrim_The_Reaper
Worth noting for php with utf-8 that Harry Fuecks has developed a library of utf-8 compatible sting functions, etc for PHP4+. http://sourceforge.net/projects/phputf8 which does not require mbstring availability (uses it if available however).

PHP6 is looking like a good step forward. It's going to break compatibility on some points but I think the cost is a lot less than the PHP4 to PHP5 move - the same PHP4 criminals will probably still whine though which probably means it'll be as well received as PHP5 has been so far. Hopefully it'll result in some weird and wonderful move towards large scale adoption, though that's probably wishful thinking...

Main thing I worry about is that essentially if you are creating any open source application for public consumption (read: anyone and everyone) PHP5 is already a no-go. As long as that vicious circle persists these great new features and cleanups are going to be unuseable by the majority.

I'm a pessimist in this case I know...;)

Posted: Mon Mar 13, 2006 2:17 pm
by timvw
I agree with Maugrim_The_Reaper.. I used to look forward to upcoming features.. But after a while i notice that most webhosts don't upgrade and the new features remain inaccessible it turned me down...

Posted: Mon Mar 13, 2006 2:25 pm
by John Cartwright
Maugrim: Zend Framework has already breached that barrier, so I would expect to see a lot more applications developed in php5 (opensource or not)

Posted: Mon Mar 13, 2006 2:32 pm
by Christopher
The list for PHP6 looks very good. Unfortunately because they are focused on Unicode they will probably not provide and OO enhancements. I get the impression that they don't think they are needed, but a little time with Zend Framework may change that opinion. Mixins, multiple _autoload()'s and real accessor support would be on my list before namespaces.

Jcart makes an interesting observation. It is getting to the point where unless you use a framework there is too much pain to upgrade major versions. At this point it may make sense to start building stuff on top of a supported framework that is going to make the PHP5->PHP6 jump for you.

Posted: Mon Mar 13, 2006 3:07 pm
by Roja
Maugrim_The_Reaper wrote:Main thing I worry about is that essentially if you are creating any open source application for public consumption (read: anyone and everyone) PHP5 is already a no-go. As long as that vicious circle persists these great new features and cleanups are going to be unuseable by the majority.
I think its going to come to a head rather soon.

At some point, the PHP internals team won't maintain PHP4 any longer. It makes zero sense to maintain *three* trees. When that happens, hosts may stubbornly stick with PHP4 - until a security issue forces the issue.

The day that a security breech occurs, and PHP doesn't have a solution except "upgrade a major version number", then we will see adoption.

However, even ignoring that "use the stick" option, I think hosts have enough reason to want to jump to PHP6. Notably, they gain a built-in cache (reduces impact, increases performance). In addition, I've seen discussions by a few people about FINALLY fixing the stack/security issue. (aka, I can make an infinite loop as a user, and take up 100% of cpu on a shared server).

Those two alone are a massive incentive to migrate. Then when you factor in fewer security fixes and updates, it gets sweeter. Kick in unicode support, frameworks, and more? Yeah, its a pretty attractive package.

I was (and continue to be) extremely pessimistic about PHP5 *ever* gaining a widespread adoption rate. PHP6, on the other hand, I suspect it might go fairly well.

Posted: Mon Mar 13, 2006 5:06 pm
by neophyte
Roja wrote: However, even ignoring that "use the stick" option, I think hosts have enough reason to want to jump to PHP6. Notably, they gain a built-in cache (reduces impact, increases performance). In addition, I've seen discussions by a few people about FINALLY fixing the stack/security issue. (aka, I can make an infinite loop as a user, and take up 100% of cpu on a shared server).
Funny! I did that once with some ADODB stuff by accident our server (wasn't shared). If I remember right I fed a connection object back into a Execute statement or something like that. I never tracked the issue back to the source but now that you mention it sounds kinda familar.

So the real question is what Framework will emerge the victor?

Posted: Mon Mar 13, 2006 5:17 pm
by Buddha443556
I have one host finally lunching PHP5. Hopefully, I'll see it sometime before July. What's that 3 years? Heck could be dead before I see PHP6 at this rate. Or using Java with Tomcat!

Posted: Mon Mar 13, 2006 11:34 pm
by alex.barylski
timvw wrote:I agree with Maugrim_The_Reaper.. I used to look forward to upcoming features.. But after a while i notice that most webhosts don't upgrade and the new features remain inaccessible it turned me down...
I second that...tis why i'm still php4 :(

Posted: Mon Mar 13, 2006 11:39 pm
by neophyte
I've got PHP 5 on a shared host. So for my own stuff I can do PHP 5. Otherstuff .. Ummm PHP 4 :cry:

Posted: Tue Mar 14, 2006 4:44 am
by Maugrim_The_Reaper
Jcart wrote:Maugrim: Zend Framework has already breached that barrier, so I would expect to see a lot more applications developed in php5 (opensource or not)
Its not current or future applications - it's the legacy apps that persist the problem. Until they are forced to update somewhere along the line (not likely unless they're being actively maintained) PHP4 will remain a requirement for these - at least for them to work without certain known issues.

Posted: Tue Mar 14, 2006 6:16 am
by Chris Corbyn
I don't get it. Hosts can run both versions... I do on my VDS.

When you sign up for hosting they can just ask if you want PHP4 or PHP5. You could even have the option to switch via a control panel.