Honestly, I would prefer PHP remove all the bad parts of PHP before adding new things.
Honestly, I would prefer PHP remove all the bad parts of PHP before adding new things.
All this even though most PHP4 scripts run unaltered in php5.
And now you suggest to drop backwards compatibiliy to get rid of warts? How long do you think it would take before that new language will get any significant deployment? What good will all the new features be if you are not able to use them in the next 10+ years?
Personally, I like to see them add features in a backwards compatible way. Knowing PHP and programming in general, I can stay away of the bad parts but still use all the new features in the foreseeable (2-3 years) future.
Just have a look at python3 of you want a taste if what you were just suggesting.
This can happen in a more feasible way, e.g. freeze PHP5 (unlike the current situation), don't add any new stuffs; branch out a subset of PHP (removing bad parts), and continue the development there.
PHP 5.4 will also drop:
- safe mode
- register_globals
- allow_call_time_pass_reference/y2k_compliance and other legacy ini stuff
- "continue 123" syntax (can be replaced with goto). As far as I recall this is done since it's barely used and if removed would allow to implement some opcode performance optimizations.
Dropping some PHP 4 era syntax is obviously out of question due to already mentioned webhosting and backwards compatibility issues.
The fact that PHP broke many websites when going from PHP3 to PHP4, then at each PHP4 minor release is probably largely responsible for this conservatism.
This has already been done, and the result is called "Python" (or Ruby, or ...). SCNR.
Edit: ok, I realize this was maybe a bit too snarky. But I mean it: if you remove all the somewhat strange parts from PHP, you are breaking backwards compatibility. And at that point, your users have no reason not to move to another, maybe cleaner language (e.g. Python) all together.
So if you want to get a cleaner PHP while breaking backwards compatibility, you might as well just use a different language.
Standardizing things, making libraries consistent, and adding some type of strict typing would be the nicest things to do, I believe.