Up until today, I was really pumped up about the imminent release of PHP 5.1. Then I read this.
I'm still excited about 5.1, but it now pales in comparison to the potential that exists in 6.0.
The best part, though, is the general concensus of change that's attached to the thread.
Read on for my opinion on the points that have been brought up. Let's take a look at Rasmus' original ideas:
1. Remove register_globals completely Yes! Anyone with half a clue agrees that register_globals shouldn't be used. Let's help those with a lower clue-ration.
2. Remove magic_quotes_* Yes! Same rule as #1. I really hate cluttering up my (must-be-portable) code with stuff like "$var = get_magic_quotes_gpc() ? stripslashes($_GET['var']) : $_GET['var'];"
3. Add input filter extension which will include a mechanism for
application developers to very easily turn it off which would swap the raw
GPC arrays back in case the site had it turned on by default. I was originally against this idea. Well, more like against automatic filtering. I've since changed mind.
One of the things that I had the opportunity to chat with Rasmus about at Conf. PHP Quebec 2005 was admin-implied input filtering. He told me that input filtering should be an option of the system administrator, and shouldn't always be left in the developer's hands. This makes sense. It's primarily the developer's burden to write good code, but most of us run apps that weren't written by us. There should be some way to apply blanket filtering.
Obviously, to make this system work, there needs to be some way for the developer to access the raw, unfiltered content (yes, there ARE occasions where it's necessary to grab '<', '="">', and '"' from the request. My retort to Rasmus' theory of admin power was "If the developer can get to the raw data (and he has to be able to do this), how are we any better off? Yes, a good developer will use this mechanism ONLY when necessary, but what about a Jr. developer who 'learns' from the wrong piece of code?" His answer: it'll be simple to grep for this mechanism. So, I conceded. I'm now all-for an automatic input filter.
4. Include an opcode cache by default. A lot of work has gone into pecl/apc recently, but I am not hung up on which one goes in.
Zend politics aside, I don't know why this hasn't been pushed harder before. +1
5. Remove safe_mode and focus on open_basedir I've never had the.. uh.. "pleasure" of working with safe_mode, professionally, but this SEEMS like the best option. Yes, it will upset a LOT of web hosts. Hopefully they'll see the light. I'm not holding my breath, though.
6. Remove some stuff that has been marked deprecated since PHP
3/4 Please, yes. With the exception of dl() (-:
7. Make identifiers case-sensitive
8. Remove various function aliases
These, I don't really care about. Either way is fine by me.
So there's my 2ยข (Canadian).
What do you think?