PHP6 - A look ahead
Moderator: General Moderators
PHP6 - A look ahead
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!
- 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!
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
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...
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...
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
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.
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.
(#10850)
I think its going to come to a head rather soon.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.
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.
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.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).
So the real question is what Framework will emerge the victor?
- Buddha443556
- Forum Regular
- Posts: 873
- Joined: Fri Mar 19, 2004 1:51 pm
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
I've got PHP 5 on a shared host. So for my own stuff I can do PHP 5. Otherstuff .. Ummm PHP 4 
- Maugrim_The_Reaper
- DevNet Master
- Posts: 2704
- Joined: Tue Nov 02, 2004 5:43 am
- Location: Ireland
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.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)
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia