Fork me on GitHub

First of all, PHP is not a programming language - it is a scripting tool. Therefore to talk about PHP, it makes sense to compare it to other scripting tools or interpreted languages - when you compare it to Javascript it is not bad - when you compare it to PERL it sucks really bad. When talking about Wordpress - Wordpress is not bad because it has been written in PHP it is bad because whoever built it had no idea, and by that i mean NO IDEA about application architecture and in particular how to properly use a database. Anyway …. rant from the new guy 🙂


It's pretty awesome when I need to do something simple on a LAMP stack.


I'd say 'PHP scripting' and 'having no idea about application architecture' go hand in hand 😉


That Pharen project is interesting... might make working in those environments a least a little more tolerable.


Hahah one of my team basically freaked out when he realized how easy it was to launch XSS attacks on the site.


@fellshard I agree that from a language point of view PHP just sucks. My point is, the programming language, respectively the choice of it, contributes only so few to a product that it is a minor issue, and the choice of the "right" language is negligible, I think. In a team that only knows PHP I would not try to convert them to use clojure professionally. I would encourage them to look into it from a learning point of view, but thats about it. As much as I would love to use clojure at my current job, its just not feasible, we are 9 developers on the team and none of them knows clojure. Our product manager expects features or turn down of tech debt, introducing a new stack solves none of this.


Agreed. But then again, if I'm in a team that knows only PHP, I've done something horribly wrong.


Hm, I am not sure if I would say this. I dont know about the environment you are moving in. But I know a lot of people that studied and after university settled in one programming language. Which one it was is dictated by the business where they started working. Also, right now I have so many perks (not money btw.) here and my business is doing so many things right, even if they switched to COBOL tomorrow and did a complete rewrite I would stay and just not care about it. Btw. I do code in Java right now and not PHP, not to confuse anything.


I think fellshards point still stands. That means you're in a team where either a) no-one has any motivation to learn anything new or b) the team environment/business is hostile to anyone who has that motivation.


You are missing option c) Working on a product with a codebase of 10 developers over 6 years in Java and not much value gained by switching to a different language, just because of the language. Our business is just not interested in language wars. If I go ahead and can prove that a switch to technology X will earn them a million more every year they surely will switch, otherwise, why should they care?


Hello everybody. I’m searching remote job with Clojure/ClojureScript. Does anybody know where I can start searching?


That said, the situation is different if I am alone and have to decide for a stack for a new project. Or even in a team that is looking for a new stack for a given problem.


Where clojurians usually find a job?


"knows only <insert language>" rather than "uses only <insert language>"


I don't think knowing or being familiar with a particular syntax is as important as understanding good design and having good taste


If someone has a good grasp of the ideas and isn't just copy pasting all the time from StackOverflow, they can get familiar with a new language fairly quickly


@danielstockton: well, language, possibly yes. From my experience, the most problematic is actually tooling and libraries/frameworks. I have just recently started to poke other languages more seriously. As a C# developer (5yrs), I am now working on pet projects on node/react and also playing with cljs 🙂


Yes, it probably helps having at least one person who's more experienced in a given environment, to be able to steer things in the right direction.


JS has a lot of choice, in that regard


@danielstockton @fellshard My bad, I thought it meant "uses", but obviously it does not. I can not imagine that there are developers that only know one language, except beginners, of course.


They're out there. Folks who specialized too early, learned exactly one thing to hop on the market as 'web devs', and never really bothered to expand their skills.


If I'm on a PHP-based project, we've either A. sold the wrong work, B. been given wrong information about said work, or C. not been given as great a consulting role as we expected once we actually hit the ground.


If I were freelancing or looking to get hired, I'd explicitly avoid places that work in PHP, because it tells me immediately something about that place's mindset.


Again: if I'm in a project that requires me to regularly work in PHP, I've done something horribly wrong, either in the company I've chosen to work for or in the people I've chosen to trust.


@fellshard I still cannot agree on that. I know a lot of places here in germany that are very successfull over years while using PHP. I am not talking about the 2 man show dangling from project to project but from 100+ employess businesses. And in the business world success is measured in revenue, not in LOC, defect count or most beautiful programming language concept.


"How much more could they grow, how much better could they work, how much stronger could they be with more mature tools?"


this mainly depends on the market, especially once you are established


of course, if you gain traction you will benefit from more performant languages that use less resources / user


How many defects would you expect to see in the codebase, especially as it devolves over time, compared to a more reasonable language? That, too, must be factored into your value. How many opportunities are lost because the application cannot be modified reliably and stablely?


PHP actively prevents you from discovering certain classifications of errors. It it fault-blind. Major defects can go basically undiscovered for extended periods.


I dont see a reason why you can not refactor a well architectured PHP application


That's not just foolishness, that's language malfeasance.


defect count mainly is dependend on the management and how well it handles it feature / defect priority


PHP cannot be well architectured, that is the primary argument.


I dont see a reason why it cannot?


The main disadvantages I read about are syntax and things like == === and other language quirks. Architecture is above them from my point of view.


Read that article again.


Read it in full.


Then return and tell me you can still hold those views.


The main disadvantage is lack of fanciness. There once was fancy ruby and fancy python. php isn't fancy.


@fellshard you mean the eev or wordpress article?


That language war stuff is soo boring each time.


But less thorough, doesn't delve into the flaws of the language design itself


The language doesn’t matter in the end. The part between the chair and the keyboard matter most.


Yep, and like a thousand different things, thats what I try to argue


language makes only a very small percentage in terms of revenue


Short-term thinking like that is what prevents people like you from generating long-term value


Too offtopic.


Looks like you are young.


Remainder of my reply didn't go through, thanks phone transcription.


PHP is a language that limits how you are capable of reasoning, and limits how effectively you can create designs that are not rigid or fragile. While you can meet those future needs, you cannot do so without far greater expense than you would with other languages, and with far less certainty of the quality and correctness of the resulting system.


sveri has repeatedly said a value-focused company can use PHP without effect. But that is simply untrue.


This isn't a pragmatic choice as it would be with many other languages. I'm not glowing with the promises of Lisp and the holy path of functional.


I'm looking at a single language and the devastating effects it can and will have on those that use it.


@fellshard I did not say without effect. What I said was that in a large company with many developers, that do product base development there are a lot of different factors that dictate success and revenue. The choice of the programming language is just a very minor thing.


I also said, when I start something new I would very well consider something else, but given I have 10 developers that are very proficient with PHP I would as well just pick that and go ahead if performance was not a major thing in my application.


There are categories of languages within which you can make those kinds of statements.


PHP does not fall in there. It's closer to Perl and Cobol in relevancy than any other language you'd say it's pragmatic to use these days.


I say it is pragmatic to use under certain circumstances


And yes, it totally is


The only circumstance you have, though, is 'that's all my dev team knows'


under which case what you have is less a dev team than a PHP team, who will not have the mentality required to create robust applications.


Being proficient in PHP does not mean that this guy is a bad developer. It might just mean that he used PHP for the last 10 years exclusively and knows very well what to do and what not. While having code 10 years C before and maybe 10 years COBOL before that and having made his PHD before.


Making such a general statement is very dangerous.


If that is all he has done, then he is not a learning individual.


He's hopping from skill to skill by necessity, not for growth.


There's a difference between choosing a tool that isn't great, but still works, and choosing a language which has the sole goal of blowing your leg off.


Like I said, the programming language usually is dictated by the business you join, except you start your own. For me the programming language is a very minor thing to consider when switching jobs.


If I saw a company using PHP, I'd know that I could add more value elsewhere, because I'd be spending my days fighting my tools instead of directly working to aid the business. It's a red alert to the immaturity of the company's technical practices and perspectives.


Some companies may not have that as the case, but the vast majority would.


The good side and bad side of PHP are both stateless. 🙂


As someone who is currently learning PHP to assist my partner who is going through school where she is learning PHP and I am a fulltime Clojure dev I find this discussion very interesting.


(^ That's part of the problem. Too many schools that still think PHP is relevant when teaching basic dev degrees.)


Well I would much rather them teach her PHP than the C#+http://ASP.NET which they also have been forcing on her


My brother had that experience too. Was baffled by PHP, then later had a class with Java and was puzzled why PHP was even taught in the first place. The end result? It's all the professor knows, and they're not industry academics.


C# + ASP ain't bad, unless it's a very outdated version...


However C# + ASP is being taught because the school is being given lots of money from Microsoft and not because it pertains to real world training. While PHP may be not so good, the ability to find a job in PHP is better.


More to learn up front, for sure, though.


Not a job that they will be able to grow out of.


Not these days.


Unless she wants to be an eternal WordPress expert.


Don’t worry about her. I am trying my best to get her a clojure gig. It’s the rest of the class that are “our future programmers” I am worried about.


but then again when I was in school it was PERL


Ahahah oh gosh


I can't imagine that in a classroom setting


Which was only like 5 years ago


@kasuko school? Which kind of school?


I was at a University in Canada when I learned about raw HTML Perl and Javascript … really I learned nothing usable in web development.


My partner as at a College in the same town


more practical but still up to debate


Hm, strange, when I was in university we learned C / Assembler / java / Haskell, but that was just minor things. The important stuff were the concepts behind it all. Concepts you can apply to any programming language.


Definitely I am not suggesting I didn’t learn anything. Also I was in a video game development stream so I specialized elsewhere. I am just saying that what I took away from school in terms of web development was actually nothing like how real world web development is done.


haha, thats so true, web development was no part of my education either 😄


All my web experience has come from on the job training 😛


Yea, same here. I think thats most probably true any experience. Thats why I say the programming language itself is not so important


For instance we have a strict customer defects > internal defects > tech debt > features policy enforced by upper management. That alone is worth so much more than most of the other stuff. We keep our defect count below ten during 10 months of the year. None of them is older than a few months. That is totally unrelated to the programming language.


While I do agree that good developers can be found in any language, and I work for a company where we work with Clojure and we have none of the above and have technical debt growing out every corner of our software … I am not going to be looking for any PHP dev jobs any time soon.


I really like a quote from the PHP: A fractal of bad design article linked above


>Do not tell me that “good developers can write good code in any language”, or bad developers blah blah. That doesn’t mean anything. A good carpenter can drive in a nail with either a rock or a hammer, but how many carpenters do you see bashing stuff with rocks? Part of what makes a good developer is the ability to choose the tools that work best.


So while yes I agree that there are PHP companies out there that are shining examples


and having a defect count of 10 is a DREAM at my current job


I still feel like my current job we’re smashing shit with a hammer and I don’t want to think of what would happen if we were working with PHP


Tech debt is what will bite you in the end...


Oh 100%, that’s what I am saying


It sounds like you have a very well written piece of PHP software


and I work on a mangled piece of Clojure software


We release twice a year, before every release we do extensive manual tests on 10 platforms additionally to our 10.000 tests we have. In that period we usually find 30 - 40 defects which we are working on until we have less than 10 and only minor defects left...


but I don’t think that’s indicative of the language as a whole.


Ah, its not PHP, we use Java, my point is only that this is totally independent of the programming language.


Anyway, I wish you good luck with it. Having tech debt grow become hard to manage earlier or later. But sometimes even that has to be. There are always cirumstances that might seem ridicioulus as a developer, but make perfect sense from a business point of view.


Let me put it another way. I am not afraid of the language that a good developer is using. I am afraid of the language a bad developer is using


meh. I think that the slack post recently had a good thing to say about php. If everyone hates it and says its terrible, why are there so many good products written in it?


Had that discussion above. 🙂


Several times as we circled the loop, hah


oops. need to stay more in tune


Naw, it was rather lengthy. Would be surprised if you went back and read the whole thing 😛


@dpsutton Correct me if I am wrong but is that article not actually against PHP? You can’t write an article that says

PHP the language sucks
and also
PHP the workflow is good
but then
here is a language that has the PHP workflow without the junk of the language
because that directly translates into “PHP sucks use Hack"


i like their central conundrum that "everyone complains about PHP. everyone uses PHP to make products and money"


they then offer some newer tools to make some PHP dev more enjoyable/safe/whatever


but i'm a big fan of people who don't care too much about tools and get things done


or at least at work.


its also super "cool" to complain about PHP so I kinda don't listen to it much


however, I've never had to work in PHP, so i haven't been exposed to how bad it may be


It's not groundless. 😐


I agree, I am currently learning PHP and have never used it so I am trying to approach this from some sort of middle ground which is why I found that article weird


because the premise suggests that PHP may in theory be good but I left the article with the impression that PHP is bad and I should use alternatives


I work at a company that has a billing system in vb5. Its certainly not sexy but it has generated quite a bit of money. I try not to criticize productive things even if there are some weird parts


we are rewriting it. reading the old code can be tedious but I try not to criticize it too much, as it literally pays my salary


Right, but that billing software is being rewritten and I am assuming not in vb5? I think there is a difference between "this works" and “how I would do it now"


If I have to work on a wordpress site I’m going to do it in PHP and it will work


but if I am planning a new project from scratch PHP has a lot of things to answer for that it didn’t when already in use.


I think the issue is with PHP as a language, not entirely with software written in PHP. It’s possible for PHP to be bad, but people to use it to write great software.


If someone takes a bad language and makes something great, then that is good, but I don’t particularly count it as a virtue of the language


anymore than if someone take a language that’s good and makes bad software


(where good and bad in the above are definitely arbitrary)


Good things can be made with bad tools.


Can't argue with that, by evidence alone.


You can also think outside the box - someone else from our company at GiveCamp actually worked around WordPress by embedding their application in an iframe, and using primarily JavaScript to orchestrate things, thus dodging most of the PHP bullet.


If you develop solely in PHP, that type of higher-level thinking will be foreign to you. One of the many concerns I hold, but that's more of a 'diversify your knowledge' argument than specifically a language one.


> If you develop solely in PHP, that type of higher-level thinking will be foreign to you. This kind of thinking to me is unfair


I think so too, its a prejudice...


It's... not. 😐


It's a fact that languages shape how you think.


A malformed, unplanned language will bind how you think into unstructured problems focused inwards, on how to work around problems in the language, and not outwards, towards problems that transcend the language.


And yes, PHP is both malformed and unplanned.


> towards problems that transcend the language. This is just hogwash


E.g. business problems? Domain logic?


I just don't buy it


php doesn't allow people to think in abstractions?


they can't solve problems that "transcend the language"


people did brilliant things with punchcards, they'll do brilliant things with php


else everything except some toy stuff i've written in prolog is crap as well


Those who use PHP as their primary language and do not do any other learning


Will be bound by the limitations of PHP and go no further.


That is true of any language, yes.


But PHP is especially prohibitive in that it doesn't build good, reusable foundations for any other language.


we get it you don't like php.


But it's more than a personal dislike, it's an objective statement that informs my preferences.


Which is what causes the dispute.


an example of a project that can't conceive of anything beyond what the limitations of php impose


yeah, i really can’t buy into the php hate. it’s a language that has picked up a lot of cruft and bad decisions over its evolution, but that hasn’t stopped people creating a.) very valuable software and b.) still producing awesome developers


there’s a big consultancy here in the UK that’s known for the quality of their developers, and their main business is php consultancy


Why would anyone create a Lisp dialect in PHP ….. is beyond me.


one of the libraries one of their people created:


also, php’s BDD library has a lot of great features that i wish would make it out to other languages:


and at the last conference i was at, someone was showing me how well built phpspec is, in terms of helping programmers new to TDD through the workflow. i thought it was sad that the same approach hadn’t made it to the languages i work with


and i think a lot of the reason the ideas don’t cross pollenate from the php community is exactly because everyone just casually shits on them


I think the point here is to use the right tool for the job. Cross-pollination is ok, but generally people believe that PHP “solves all the world’s problems” - which is why some potato-for-brain decided that it was the best thing ever to write a socket server in PHP to handle 300,000 concurrent users with millions of back-and-forth messages …. for a company I used to work for many years ago…...


PHP developers often know only PHP


And that leads directly into the golden hammer antipattern


i could say the same of a lot of java developers i know


Specializing in PHP as a consultancy does not make the language good or mature, it just means they've found a space that has demand.


compared to those polyglot http://vb.NET and java developers


Yeah… most developers treat their language of choice as their religion haha


that's true of specializing


if i were launching a business


i’d much rather have a good php developer who moves fast than a [insert other language] developer who isn’t super “web savvy"


i know you can replace php in that sentence with any other language


Move fast now, halt later.


Sabotaging future growth for current speed.


but my point being, for a lot of people who aren’t developers, they don’t care what’s being used


they just want product shipped


yeah, but you can ship terrible product in ANY language


So they use the last buzzword language they heard of, and put out a call for devs.


php makes it a bit easier to do that, but again, the quality of the developer far outweighs the language they program in


A tool selected by non-technical individuals is already a hazard.


also don’t forget how many companies start on a shaky php codebase simply because whoever the first developer who worked on it just happened to know php


or one of the founders learned enough php to get something off the ground quick


(golden hammer)


it’s not a golden hammer, more the fact that for a lot of people that’s the lightest hammer to get up and moving with


i’ve watched beginners dash themselves at other languages and then get discouraged


then they try php/js and they’re… woah, stuff is happening


in my opinion a great C++ / Java programmer can automatically become a great PHP developer. But a great PHP developer will have a learning curve to become a great C++ / Java developer. This tells you something about each respective language.


if they’re not particularly technically inclined, none of the other stuff matters


If they're not particularly technically inclined


they should not be creating technical systems.


@9thzero that's mostly types, I don't think Java -> PHP is that straightforward


(I did cross that path)


This is how we get industry malpractice. 😉


Security breaches up the wazoo.


yeah in an ideal world


but you know that’s not how reality works


A non-technical person does not consider all the factors that must be considered to create applications that will not only provide value, but not hemorrhage value.


@fellshard to play devil’s advocate - the amount of security breaches introduced are directly proportional to the incompetence of the developer regardless of language.


people without sound management skill should not be managing other people, but that happens too


i know so many small startups that just kinda accidentally happened


Agreed. That's a separate line - the professionalism and ethical considerations of the software industry - but the tie-in is that a vast majority of PHP developers fall under that 'non-technical' or 'low-technical' category


most success is accidental haha


And the language was built to support those individuals in not thinking about it further.


probably because of a lack of people with enough knowledge to do it "right" (whatever that means)


@fellshard that’s a pretty big generalization - i would say that’s the case of Javascript script-kiddies though ….


anyhow…. back to work-related things i go…. one could spend many more hours on this debate haha


Eheheh. Not gonna open the JS can of worms, too. PHP is enough on a plate for one weekend :X


Are you still talking about PHP in here


The conversation continues, yeah.


not much useful content, though


That one's come up a few times, yeah. :X