Look at this incredible thing Ian Baker created. Look at it!
What you're seeing is not Photoshopped. This is an actual photo of a real world, honest to God double-clawed hammer. Such a thing exists. Isn't that amazing? And also, perhaps, a little disturbing?
I work with PHP every dayā¦ and i must sayā¦ it really sucks!
For my hobbies i learn and use python for programming what i like and projects in my spare time.
I change from php to python in a second!
Flask and even django is much better framework (for web programming) than the famous Zend Framework (urgh!).
And i find python initial configuration very easy to do!
Obvious that iām trying to get out of the PHP world, but still is a battle iām losingā¦ perhaps in timeā¦
make the alternatives so outstanding that the choice of the better hammer becomes obvious.
Uhā¦ let me seeā¦ Python? Ruby? C#? You can run Python and Ruby on plenty of places, Heroku being the easiest. C# can run with ASP.NET in plenty of places too, or web pages (PHP-like file-based structure) thanks to WebMatrix, onā¦ well many too, AppHarbor being the easiest.
Somebody could compile a list of Perl5 modules which are useful for web programming and then create a meta module which depends on all of them
Then, installing would be as simple as cpan Web::Programming::All. Decent versions of Perl are installed by default in most Linux distros, so no need to install Perl itself
[ And in the future, when Perl6 is stable, do the same thing for Perl6 ]
And thereās only one thing worse in my eyes than PHP, and thatās Wordpress PHP. Take all the awful things about the language (and none of the good stuff, even in PHP4) then smoosh it up along with your own horrid procedural concepts like āthe loopā, document only half of it, get hundreds of developers to add their tuppence-worth, then smugly tell the world you power 22% of the web.
Arrrgggghhhh. It could be so much better with a rewrite, but they donāt have the balls!
What commenter Tadas says about deployment headaches is largely true in my experience as well.
That said, one thing to consider might be finding some way to leverage PHP as a deployment vehicle. Surely it should be possible to code up some sort of VM in PHP that executes three-address code, or to write a compiler codegen module that outputs valid PHP from its internal TAC representation.
So in the ideal world, you come up with this amazing new platform, call it JeffScript or whatever. You provide a great native tool chain and reasonable integration with the big players of web serving (Apache and IIS I guess) and then, as a āside project,ā you provide an alternate deployment method that compiles to PHP (having coded up API bridges to the 25-30 most popular, but not part of the base package, PHP modules.) This approach has seen some success in things like Jython, Erjang, JRuby, etc. (Hell, thereās apparently even a PHP -> Java bytecode compiler ā who knew!?)
The problem I see here is that part of the attraction of PHP is that for beginners/prototypers/contract-developers, there are mountains of bad, but free and quasi-usable code out there just waiting to be (ab)used. Full CMSes! CRM applications! BBoard systems! Frankenstien-ing up hybrid web apps seems to be a major passtime of PHP contract developers, and itās a feature that I struggle to see how JeffScript-on-PHP might leverage.
One approach would be to try and play the same trick as Dart or CoffeeScript - write a language that compiles to PHP so that you can deploy it currently, but with a view to replacing it with a more stable platform which takes advantage of your new language. Itād be very tricky to execute, but if it worked it could accelerate the move away from PHP.
I think you miss a very key point, that sucking matters for shit when youāre able to get stuff done with it.
Additionally, saying nothing has changed is a bit of a ruse. Follow the internals lists, and watch whatās been happening in newer releases, and youāll see that lots has been changing.
While I agree that PHP has a disorganized set of public functions - the basic class system is quite sane from PHP 5 onwards.
I have to agree with Anthony Ferrara on this one.
PHP is the easiest language to set up with a (*nix) web server. That alone adds a lot of value. In comparison, setting up Ruby or Python is rather scary.
PHP isnāt the problem, bad programmers are the problem.
The PHP community is practical above all else. What RoR does by developing an entire stack of functionality, PHP does with a few bash scripts, and then gets back to solving problems.
PHP sucks, C++ sucks, Javascript sucks, Java sucks, see a pattern?
I think the blog post entitled āThe Silent Majority of Expertsā describes this blog post very well
JavaScript sucks pretty hard too, it exhibits some truly terrible design choices, but itās immensely popular and there are no signs of itās decline. Thereās been a trend in recent years to put emphasis on the importance of writing good JS, and avoiding the bad parts (bad parts as famously highlight by Douglas Crockford), and JS has benefited immensely from this - thereās been an explosion in the depth, variety and of JS frameworks/libraries etc.
Perhaps someone should, as Mr. Crockford did, start highlighting whatās good and whatās bad (in the practical sense, instead of complaining) and start educating people on these things, so that those that care about code quality can get on with writing PHP, and writing it well.
I have a long relationship with PHP. Iāve always thought it to be terrible (well, at least since the time I started high school), but I totally agree with you that it is near impossible to pick other choices.
PHP is supported on all shared web hosting servers. It is as easy as uploading your file and you are good to go. No strange CLI commands to run, no dependencies to download. Simple web form applications are really easy to get up and running in PHP (not as easy to make secure due to the non-existant type system). You donāt even need to know PHP to use it, you can learn as you go. Itās very easy to pick up and you can see all your changes immediately.
These are all compelling features of PHP. In comparison, how do you deploy a Python web script? I mean a simple one-or-two-files type of script. Do you use the Python CGI module? How easy is it to read the querystring and posted form data in Python? How well documented is this use-case? If I search for how to publish Python to the web I end up with a lot of Django, regardless of if I really need a full-featured MVC framework.
PHP is easy to deploy in a hackish manner. It only sucks when you are trying to leave the āhackish stateā or write something secure. I therefore think that the āhackish stateā is what needs to be implemented in other languages. It must be easy to set up a simple script hack, but equally easy to deploy high-quality products.
Here are some of the features I think needs to be fixed by the PHP successor:
It must be easy to host. Shared web hosting companies must be able to do a simple āaptitude install perfect-language-web-packageā or something similar and just tweak the configuration to their needs. The web hosting market is also heavily concerned with price so a free environment is preferred. This also sort of implies that there should be one preferred way of deployment, not a multitude of different methods.
It must be easy to deploy. It is hard enough to get web developers to grasp all the intricacies of FTP and user permissions. To get into the market you should be able to deploy by just uploading your files.
It must be well documented for web use cases. This includes tutorials, support forums and so on.
The language must have web support. It must have good support for web technology like HTTP headers, character encodings, file uploads, form posts, sessions, databases and cookies. Preferrably even a really good Ajax framework. Bonus points if most of this is automatic.
I welcome a future without PHP and I am prepared to help out on this work. Please keep us updated!
Not arguing for PHP here, but it has at least four things going for it that other mainstream languages donāt: low effort config, ubiquity, utility, and a short learning curve.
The newbie adoption experience for other mainstream languages and frameworks has a lot of friction.
And over time, the tools become more complex making newbie adoption that much harder (Iām looking at you rails).
There are some efforts at helping with this (e.g. Yehuda Katzās promising Tokaido).
But thatās the exception, and it seems to me that the real solution to taking down PHP is providing an easier on-ramp for novices.
āI think you miss a very key point, that sucking matters for shit when youāre able to get stuff done with it.ā
Well said and to be honest the only people who should give a shit are the people writing software, there is no perfect language that everyone loves and at the end of the day itās our customers and users that should be the focus.
Programming language debates are about as relevant and useful as games console wars, use what you know and what you like, and deliver what the users want, because pretty much anything can be achieved in any language.
I dislike PHP, but do I care? Does it affect me? No, not at all, and thatās the way it should be IMO.
I disagree about the frictionless everywhere comment. This may be true for apps written with only the core of PHP but start to get into the extensions and you can get all kinds of incompatibility problems.
God help you if you need to run Pear modules.
I once spent two days with a rock star sysadmin getting the ecommerce engine Magento to install right on CentOS. I think we even had to edit a make file at one point.