![]() |
PHP6 Wishlist
With PHP6 well under way and a few snapshots available. We know quite a few of the features they are implementing. However, what would you like to see?
To start it off, I'd like to see namespaces in PHP6. There is some talk of adding namespaces, but I doubt it'll happen in all honesty. I suppose we could use static functions inside classes, to have like: PHP Code:
PHP Code:
|
Personally I'd quite like to see namespaces implemented as below. But however they're done I don't mind too much so long as they are introduced!
PHP Code:
|
It would be nice, but I just don't see it happening, do you? PHP's functions are getting ridiculous these days. The one I always pull people on is
strip_tags to stripslashes, and after reading the founder's comments about the inconsistency, total cop out. Come on lads, sort it out! |
Would be cool if there was a new hash algorithms. Something fresh thats more secure then md5 and sha1 :D.
|
I don't really see a point in a new hash algorithm, md5/sha1 work just fine - throw in an SSL on the line and you're quids in.
I would although like to see the whitespace error resolved when you include Javascript in a page with the header() function. |
Some multiple inheritance maybe? Also operator overloading would be a really nice addition.
|
Quote:
|
Quote:
Other than that, I'd like to see things like xdebug be built in as a true debug profiler, and have them fix the damn Filter functions. they are le poo. |
Quote:
|
Quote:
Function overloading, multiple inheritance. |
Quote:
|
Having type strict variables will solve most of the problems that we currently face with PHP... also PHP should not allow unlimited number of arguments in functions... this will solve the problem that functions cannot be overloaded
|
I would actually like strict data types as well. I hear that they've actually begun to add namespaces into PHP6, but we shall wait and see because you know what happened in PHP5 - they added namespaces and then removed them altogether just before its release.
|
I hate the idea of strict datatypes - it's why I stay away from languages like ASP. Also I don't see much advantage in namespaces to be honest, I don't think much should change on the variables side of things. It would also be nice to see some new useful URL rewriting functions available without Apache - Only because im on IIS and rewriting is a pain in the ash.
|
Namespaces will be a life saver when you realise that so many global functions is a really bad idea. URL rewriting will always remain with Apache as that's not a PHP task at all - even Ruby on Rails uses Apache's mod-rewrite, so I think you're well out of luck on that one. Namespaces are useful as it gets rid of those prefixed functions you see dotted around the place - simplexml_* to name one. You would just do something like:
php Code:
|
Ah yes, in regards to URL rewriting, imagine a function took the whole URL and split it up, if it find for example "users_id" in whatever.com/showuser/users_id/100.php then it would use from the slash after users_id to the end, if it sees .php remove it, if it sees / (due to more parameteres) then carry on collecting data. This could be made using your own load of functions but I suspect its a dodgy one to write... I think I may look into doing it myself.
|
Re
Quote:
Strict data types, type hinting and all the things that comes around that. BTW People around the web talking about the next formula : Quote:
|
That would be a nice welcome! Waiting until late 2008 for namespaces, etc. is far too long so I'm glad they've made the decision to release PHP 5.3 with all the additions of PHP 6.
|
Interesting... I've not even learnt all the new PHP5 features yet and now to learn more w00t
|
I've also heard that all PHP6 is going to be is just really Unicode. Forget where I read that... think it was on a blog or something. See if I can't dig up the article.
I have to disagree with making PHP a strictly typed language. Yes, it's very very weakly typed... but that's one of the things that makes it so easy for newbies to comprehend. You can still use type casting... you can still enforce the number of arguments passed to a variable through interfaces. And again, one of the more attractive features of PHP is that it has so many premade functions for you, that make it quick and easy to learn and do something with PHP. So I don't think they should take away from PHP, especially in a way that could drastically deform the language. SO, yeah, adding features like namespaces, that would be cool, but I don't feel it should have to be enforced. It's a scripting language. It should stay scripty. |
| All times are GMT. The time now is 10:37 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0