7 ms·
Ewww, You Use PHP? [2010]
- claudiug 12y agothe post is from 4 years ago. we put rosseta on a comet meanwhile. Also, php has changed and with the new framework like laravel things look fine.
- tormeh 12y agoThis is such a fallacy. A programming language is as much, if not more, about what features it doesn't have as what features it does have. PHP still has all the old crap so it's still crappy, and will remain so.
- sanqui 12y agoThanks. Can we get a [2010] on this post?
- justincormack 12y agoI don't think any PHP was used to put anything on a comet recently.
- yc1010 12y agoI get this all the time, started with C and Java back in university well over 10 years ago, but after doing a few projects with PHP and starting a few personal projects (one of which became rather infamous years later lol) i got hooked In all this time there has been a huge change in the PHP world TBH if a "developer" cringes their nose at a very capable tool, just because it is not the latest "cool" thing, It tells me a lot about them.
- dscrd 12y ago>one of which became rather infamous years later lol mtgox? :) >TBH if a "developer" cringes their nose at a very capable tool, just because it is not the latest "cool" thing, It tells me a lot about them. This is called the straw man fallacy. You wrongly assume that the lack of coolness is why people dislike PHP and you dismiss the whole argument based on that. Doing great stuff with PHP is like building a skyscraper using nothing but a hammer and a screwdriver and a few rotten planks. It's the builder who's amazing (albeit a bit crazy), not the hammer, the screwdriver or the planks. Imagine what he might've made with proper equipment? Would you like to live in such a skyscraper?
- Joeri 12y agoMaybe I'm biased because I make PHP software for a living, but I would have to disagree PHP is harder to use properly than other languages. It has the duck typing abilities of javascript, and the class system of java (including rich reflection features). Yes, some things are weird, but no weirder than other languages. The type conversions are not weirder than javascript, and the function naming chaos is not weirder than C. I've programmed all those languages extensively, and I wouldn't say any of them are more productive than PHP. What PHP is for me, is a paper cup. It's modest, utilitarian, not cool or elegant, but definitely efficient, useful and ubiquitous.
- icebraining 12y agoIt has the duck typing abilities of javascript, and the class system of java Talk about a backhanded compliment :)
- airtonix 12y agoand yet python does all that without being ugly.
- mercurial 12y agoThe fact that PHP manages to combine drawbacks from different languages without offering corresponding advantages is not an endorsement.
- yc1010 12y agomtgox? :) ROFL :D (no tho in hindsight robbing half a billion and getting away with it doesnt seem like bad career path)
- Zr40 12y agoIt's not about PHP being "uncool", it's about the many things in PHP being objectively wrong.[1] Of course it's perfectly possible to write good code in PHP, but compared to other languages, writing proper PHP requires a lot more effort. [1] http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
- ThomPete 12y agoNothing is objectively wrong in computer languages or any other languages. If it had been objectively wrong then the language wouldn't have been useful at all. The purpose of a programming language is not to allow you to write beautiful code but to produce things. Everything else is a pseudo debate that is necessary at times but not as much as some would like.
- xrstf 12y agoPlease stop sharing this blog post like it's the Holy Grail. It's full of nonsense and false information about PHP. Not that there aren't issues in PHP, but this assembly is just "PHP doesn't have feature X and doesn't behave like language Y, so it must be bad. I didn't bother reading the documentation or any code written after 1998.".
- Mithaldu 12y agoIs ?: still left associative in PHP?
- imakesnowflakes 12y agoOh, documentation. It is still broken, even on the most basic level, I should say. http://www.reddit.com/r/lolphp/comments/2md8c0/new_safe_casting_function_rfc_casting_10_to/cm3djvj http://www.reddit.com/r/lolphp/comments/2md8c0/new_safe_cast...
- joepie91_ 12y ago> nonsense and false information Such as?
- joepie91_ 12y agoSpeaking as somebody who has done PHP for some 8-9 years, I still cringe my nose at it. See, the thing is, PHP has gotten better. That's not in dispute. The problem is that, even after it "has gotten better", it's still far behind most other options that are commonly in use, and still highly inconsistent and upredictable. It is rather telling in and of itself when you have to use "well, it has gotten better" as a crutch to argue that, at least, it meets a minimum standard of viability. Frameworks don't really solve this problem. Fundamentally, you're still working with a language that does some really weird things - things that are weird enough to cause near-untraceable bugs and completely unexpected vulnerabilities. You can slap a lot of abstraction onto it, and it does make it less unwieldy, but in the end you're still limited by what the language or platform has to offer you in terms of inherent consistency, predictability, and debuggability. Just take, for example, PHP's CGI-like nature. Yes, it is theoretically possible to have a long-running process, and it's theoretically possible to implement real-time services with it, but it's going to be a major headache and incredibly hard to maintain. The tools are just not really there. Any solution you come up with will, in the end, be a giant hack. Don't assume that somebody who cringes at PHP is just somebody who likes jumping on bandwagons. There are very real and rational reasons to dislike PHP, even (especially!) as an experienced PHP developer.
- airtonix 12y agohey, remember if you turn your nose up at shitty languages and platforms, you're somehow revealing something bad about yourself. Not like the exemplary attitude of "awesome lets cut our wrists all day and open windows explorer to deploy"
- yc1010 12y agoPHP doesn't do EVERYTHING but it is good for surprisingly a lot of cases What happens when you have existing code in Java or python that does something you do not wish to reinvent the wheel with is you simply interface/bridge with from you PHP code. Right now I have 5 servers running python batch jobs processing some data (for a few months now) which is called by php with results being added to datastore for later access with php In the past I worked on an asset tracking system where we collected data from RFID readers, whole system was done in PHP with some glue Java and C code for more "to the bone" edge cases Everything I have done in PHP i could have done in C which I first learned and still use alot of, doesn't mean I want to spend my life wasting it on 90% of cases where a quick php script does the job within reasonable time I never claimed PHP is "awesome" or whatever you think I did, but it is a very capable language at getting things done fast, especially if you know what you are doing Yes there are armies of noobs giving PHP a bad name, but instead of turning your nose at them one is better helping them and showing them how to do things better
- InclinedPlane 12y agoI've done tons of PHP coding on various projects, some of which I'm quite proud of. That said, I will probably never stop cringing at the use of PHP for any project. It's a terrible tool in a huge number of ways, some of them fundamental. Yes, it's a functional tool, but mostly it's a competitively capable tool only because every other language/platform out there is also more or less equivalently terrible in some other way.
- Hytosys 12y ago>TBH if a "developer" cringes their nose at a very capable tool, just because it is not the latest "cool" thing, It tells me a lot about them. I doubt you could convince a developer to condense their opinion of PHP to "PHP isn't the latest cool thing, so I don't like it." As such, I posit you're being as judgmental and dismissive as your supposed adversary.
- cageface 12y agoWe're stuck with one badly designed language on the frontend (Javascript), for reasons we can't really change now. But why on earth would you choose another badly designed language on the back end when you have so many better options? Stop being lazy and unprofessional and spend a month or two learning one of the many better commonly used web dev languages.
- Pezmc 12y agoI think the key problem is more that PHP is easy for developers to pick up and there is a lot of misinformation, in particular very outdated PHP 'tutorials' out there that have the whole idea quite backwards. As it's often the first web development language picked up by people, who may not necessarily know what they're doing, it gets a bad reputation. Used correctly, however, it can be just as powerful as any other web development language.
- joepie91_ 12y ago> Used correctly, however, it can be just as powerful as any other web development language. That's a disputable statement (as I mentioned elsewhere, take long-running processes as an example), and even if it were true, that doesn't make it the correct tool to use. You can hammer in nails with a wrench as well, but you should still probably be using a real hammer.
- erhardm 12y agoPHP hammer[0] made using the specification[1] [0]https://secure.flickr.com/photos/raindrift/sets/72157629492908038 https://secure.flickr.com/photos/raindrift/sets/721576294929... [1]http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#an-analogy http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#a...
- fredsted 12y agoWhile this is an old article, I agree, and PHP has only gotten better these past years. Not to mention tools like Composer, Laravel and Yii – most popular CMS systems are built in PHP too: Drupal, WordPress, TYPO3. Being an expert PHP programmer opens you up to a lot of possibilities, and while it has some idiosyncrasies, it's not like JavaScript, ASP.NET or Python doesn't have their own share, too.
- joepie91_ 12y ago> Not to mention tools like Composer, Laravel and Yii Virtually every language commonly used for web development (Python, Node.js, Perl, Ruby, Lua, ...) has equivalent or better tools. This is in no way exclusive to PHP.
- Implicated 12y agoI don't believe he intended to infer that they were at all exclusive. Seems to me that he was just mentioning them as aspects of the language that have improved recently.
- Garbage 12y agoRecently I worked on a PHP project for a month. And heard same "ewwww" reactions from people. And even though I was skeptical about PHP, I must say it was fun. It wasn't the same PHP I used 6 years back. PHP has come a long way since. Frameworks like Symfony (Rails equivalent) is just amazing to work with. In total, I think people should give PHP another try. It's worth it.
- mszyndel 12y agoPlease don't say Symphony is Rails equivalent because t's very misleading and basically not true. There may be some similarities but they're nowhere close.
- deleted 12y ago[deleted]
- alexcroox 12y agoThere are 2 types of programming languages, those that people love, and those that people actually use.
- elmin 12y agoI both love and use Javascript and Go.
- calibraxis 12y ago> thinking nothing interesting could possibly be done with PHP Sadly, a lot of incompetent developers email each other articles like this, as fodder for dev team language flamewars. This quoted sentence is likely hyperbole, but they take it seriously and strawman people. (Naturally, language evaluation is multidimensional. You consider alternatives, foresee tradeoffs, etc. PHP can be right/wrong in your situation.) I knew programmers (and their CTO) who trotted out such articles to defend the broken PHP framework which they used to run half the business. I'm sure the framework's own authors would be aghast they still used it. The team working on it had near-zero productivity; virtually all spent maintaining the beast. New hires were flabbergasted at how slow the webapp was, which harmed the productivity of most in the company. One maintainer had a private project to incrementally rewrite the shit in another (very popular) language; the CTO indulged him but refused to support it. (Mercifully, the company got put out of its misery. People might counter that the PHP codebase didn't kill the company. But of course that's not how it works. Incompetence suffuses many such decisions; each of which is just a facet of the same incompetence. And each incompetent decision reinforces the others.)
- ThomPete 12y agoPHP is the duct-tape of programming languages. It might not be pretty but it gets the job done, and getting the job done is all that really matters. With the exception of JavaScript which is also "wrong" by many puritan developers opinion, PHP is the only language that is welcome to complete novice programmers. All other languages require a lot of setting up. Furthermore the ease at which I can combine JavaScript with CSS with HTML with PHP is one of the major reasons it ever got so popular. No other language allow me to do that.
- mercurial 12y ago> Furthermore the ease at which I can combine JavaScript with CSS with HTML with PHP is one of the major reasons it ever got so popular. No other language allow me to do that. If you mean by "the ease of combining Javascript with CSS with HTML" is that you get a mediocre, unsafe templating system out of the box, sure. All mainstream languages have various third-party templating libraries which are usually far superior to PHP. The big advantage to PHP is its omnipresence, large standard library and ease of deployment. It remains, however, an awful, warty language which makes it easier to do the wrong thing than most other languages I know.
- krapp 12y ago>All mainstream languages have various third-party templating libraries which are usually far superior to PHP. Including PHP, of course.
- mercurial 12y agoKind of defeats the out-of-the-box thing, though.
- krapp 12y agoMaybe, but the advantages provided by frameworks in other languages are also available in PHP, so comparing the relative safety of one language to the relative safety of a framework in another language seems unfair. Although PHP does offer the option of using the "PHP framework", which the other languages don't, so, yes, when used in one particularly bad way, PHP is particularly unsafe.
- nikon 12y agoAs a recovering PHP dev (I haven't touched a line in over 2 years) I'm happy I no-longer use it. It's inconsistencies drove me insane and I hate the F'ing dollar sign! However I seem to have swapped that inconsistent, badly designed language with Javascript.
- philjackson 12y agoI was lucky enough to meet the guys at Mailchimp a few years ago when my startup was working with them on a project. It's a great company; super offices, wonderful people and a sustainable, profitable business. If I wasn't in England, I would consider pushing hard to try and become a part of what they're doing.
- Artemis2 12y agoI think that since Mailchimp has grown strong enough to hold a consequent part of the email-sending software market, unsubscribing from newsletters/spam has been a lot more easy than before.
- FabianBeiner 12y agoA bad developer will produce bad code in whatever language he is using. If asked, I’d tell everyone “stick to your guns”. Use, whatever gets the job done most quickly and efficient.
- erhardm 12y agoA good developer uses the best tools available, because she/he knows the value of using them.
- innocenat 12y agoNo. The value of knowing your system well far exceed the value of supposedly best system (of which is really arguable). Especially if it's a rush job, using tools you know well will drastically reduce time needed, because you already know in and outs of such tools, and is able to identify buggy part quickly. Also, as we are talking about web development, what is best tools? ASP.NET? Rails? Django? Go? J2EE?
- deleted 12y ago[deleted]
- tormeh 12y agoJSP is an improvement on PHP, I've heard.
- deleted 12y ago[deleted]
- FabianBeiner 12y agoIf you got all the time in the world: Yeah, do this! But lets be honest: Ain’t nobody got time for that. So if you got this great idea and you only know PHP (or Ruby or Perl or Python or you name it), don’t wait and go for it.
- segmondy 12y ago
- peterhi 12y agoWell this article is over 4 years old, which is positively Paleozoic in language development terms. But I am sure that the discussion here will be equally out of date. Can we have less of these sort of articles please, it was a waste of my time skimming it.
- knappador 12y agoMost large companies with well-oiled legacy systems actually are not that bad to work with. I've seen the guts of a large PHP system, and while it was still re-inventing the wheel all over the place, they had still solved all of their problems and had established practices that encouraged stable business. Not interesting, but neither are consolidate businesses to begin with. PHP will cease to be gross when it's not just the large implementations that are very nicely done. This is not the PHP that exists in the vast seas between these islands. PHP is not something that a rotational employee or someone who is career-conscious will choose or accept for long. They want to work at your company for a while. This can be good. PHP is a career limiter in a way and I think the cringe reaction is a natural tendency to want to open up the conversation to see if what could be a good rotational job is also a toolchain dead end. Career conscious programmers don't want dead ends. The gripe is and always will be that PHP encourages bad practices because it includes a bunch of "features" that are undeniably prone to bad habits. It's not personal. Really, we don't want companies using PHP well to die. We don't want the programmers using PHP to go away. We want PHP to stay put because better tools are out there, and anything that perpetuates the use of PHP in new products feels gross. It feels especially gross to the career-conscious young ones. Sorry.
- Wilya 12y agoWe’ve built a framework for developing applications in PHP specifically designed to allow for fast innovation in the high-load, high-performance environment we live in every day while still keeping the API extremely simple to deal with. Why go with PHP and have to roll your own framework, when you can go with something else, and leverage all the great work that has been done by the Django/Rails/whatever folks? This post tells me all that they have accomplished, which is cool, but doesn't tell the most important thing: why did they choose PHP? I have to take missions in PHP (Symfony2 and Zend Framework) from time to time, and it really makes me appreciate how much more advanced Rails is. And I don't mean advanced as giving me lots of options for doing obscure things. I mean advanced as doing for me all the repetitive stuff that I would have to do anyway, so that I have much less code to write, much less room to introduce bugs, and I can focus on what really matters. The PHP ecosystem is trying to replicate that, but so far, it's still quite far behind.
- krapp 12y ago>Why go with PHP and have to roll your own framework, when you can go with something else, and leverage all the great work that has been done by the Django/Rails/whatever folks? To be fair, no one has to roll their own framework in PHP, it has frameworks aplenty. I don't know why anyone would do that.
- alexbilbie 12y agoI wrote an API at work which was originally written in Laravel because it was fast to prototype in. I've since replaced it with my own "framework" which is mostly a very thin wrapper for several really good packages (router, DI container, events dispatcher and query builder wrapper). I'm getting 10x performance out of it than I was with Laravel, and overall it's a very small codebase which is easy to understand and test. So yes, no one "has to roll their own framework in PHP", but there sure are advantages to do so if you know exactly what you need and how to get there.
- krapp 12y agoFair enough. If it's lightweight then it makes sense.
- joepie91_ 12y agoI can't help but notice how virtually every PHP "proponent" is arguing how PHP is "not completely terrible", rather than arguing how PHP is "good". That's rather telling.
- ThomPete 12y agoNice strawman. Thats not at all what people are saying.
- joepie91_ 12y agoIt's not a strawman; it's what I'm observing from not just this thread, but also other discussions in the past.
- krapp 12y agoI don't understand the reason for the quotes around 'proponent', but it's perfectly reasonable to say that, yes, despite its flaws, PHP is adequate for its purpose. There are valid reasons to choose it, and valid reasons not to. Of course, you could say that about every language, and many do[0]. [0]https://wiki.theory.org/YourLanguageSucks https://wiki.theory.org/YourLanguageSucks
- joepie91_ 12y agoI put quotes around "proponent" because it applies to pretty much all arguments I've seen in favour of PHP, not just those of people who try to actively 'promote' it. I couldn't find a more accurate word to use there, really, so I settled for quotes.
- phpnode 12y agoHello. PHP is good. It is still far faster and easier to put together a website in PHP than any other language. It has enabled millions of people to become web developers. It powers about 90% of the web and best of all it offends language snobs
- 12y ago
- boomlinde 12y agoThe article mischaracterizes the criticism agains PHP as boiling down to thinking that nothing interesting can be done with it. In doing so, it fails to respond to what criticism against PHP typically boils down to: PHP sucks.
- dude81 12y agoNot sure of this Ewww, much of the bigger sites like Facebook and Flickr, both use PHP..! This "Ewww..!" AFAIK is beginner coders perspective. Some company's are promoting this kind of things on language because they need different skill set people in the market. As an Architect, it is best to know as much languages as possible.
- ArtDev 12y agoPHP has come a long way in the last few years. Just like Javascript, the language has changed dramatically for the better.