I worked at a PHP-based company and after a year of intense interviewing, we finally decided to switch core languages and tech stacks because we weren't attracting strong enough candidates. What we found is that most good programmers didn't want to work in php and most php developers were designers that learned how to code php. But they didn't understand CS fundamentals or even a decent idea how to code. They could c…
PHP Sucks
81–90 of 297 posts
Re: PHP Sucks
#82I used to feel the same way a lot of times, a shame it seems for being a PHP dev. Now, I don't care. I've been using it since 1999, and I use it to get stuff done. My customers and users of my applications don't care what it's written in. But, you should definitely learn more languages as a programmer. > And to anyone considering programming as a career, or trying to get into it... stay away from PHP. This is the par…
The stigma remains. All other things being equal, choose a language where you're not going to have to fight this fight.
Re: PHP Sucks
#83Earlier quoted context omitted.
That's right they'd probably be struggling to scale Ruby on Rails like Twitter who started 2 years after facebook.
To be fair, FB struggled to scale with PHP, although it certainly fares better out of the box (even then). A lot of their work has gone into making PHP more performant and better by way of Hack. PHP7 took a lot of great ideas from Hack but is still saddled with its legacy.
Never remember Facebook having much issue.
Re: PHP Sucks
#84Re: PHP Sucks
#85More work was available locally with PHP. Clients were more willing to pay. I've done a ton of things in WordPress that shouldn't have been, "to save money". And I've done greenfield development with CodeIgniter, Laravel (v3 and v5), and a customized set of the Symfony components. I've also maintained and improved brownfield projects that were outsourced.
I'm very tired of hearing that PHP sucks. PHP is a good language. And in my opinion, it has fewer ways to sabotage your own project than any language with monkey patching. PHP7 looks really awesome, and the community has been upgrading quickly toward it. PHP has always had best-in-class documentation in my opinion.
More often it's the programmer who sucks, not the language.
Re: PHP Sucks
#86I'm by no means an expert on PHP but whenever I begin having similar thoughts like the author, or begin having internal language religion wars in my head about PHP, i remember that PHP actually stands for "PHast Prototyper" (language/platform)..and tools/platforms like that have their place in the world to help us...and then this thought allows me to regain my peace and progress forward on my day (focusing on bigger…
Re: PHP Sucks
#87What Evert is referring to (the "reputation" of PHP and people's reactions) is even worse in infosec. I very frequently get accused of being a charlatan simply because I write PHP. Some people openly question if a PHP developer who understands security exists at all : https://twitter.com/MalwareJake/status/506488937096183808 This is silly when you think about it. If so many systems run PHP, wouldn't you want your inf…
So it's not peer pressure, we actually have data to back this up, and if you think about it, the whole thing boils down to motivation. Sure, you can write secure and insecure code as well in any language/environment. But defaults are powerful, and it makes me feel sad every time I have to write in reports that "you should've paid attention to opt-in to the secure solution every time you do X" vs. when we do demos to developers and we have to work really hard to disable every protection built into ASP.NET. (And no, I don't like Microsoft at all.)
Re: PHP Sucks
#88Earlier quoted context omitted.
Well.. people that don't know how to code but want to hack in a 1 line dynamic thingy.. where else would they turn? It build a pretty good community for newcomers. Now as to why a facebook would use it? mindblown
Facebook wouldn't use it if Facebook started two or three years after it did.
Re: PHP Sucks
#89Personally, I don't see much point in arguing the merits of PHP compared to, say, Python, Ruby or Javascript, since those languages are so similar: procedural scripting by default; opt-in use of OO as the happy path for most libraries; functional programming possible, but an uphill struggle WRT APIs, tailcalls, language cruft, etc.
There's also a lot of interbreeding in those language's ecosystems, so there's rarely a killer library/framework/app in one which doesn't have a few carbon copies in the others. I would recommend developers in those languages look at what the others are doing, but I don't see much point in switching between them as an end to itself; go for it when convenient, but nothing much will change (e.g. I was heavily into Python, but fell into PHP dev roles commercially).
The more interesting comparisons are to be made with languages/ecosystems which have a different philosophy, e.g. Java/C#, Haskell/ML, Lisp/Scheme/Lua, C/Go/Rust, C++/D, Smalltalk, Forth, etc. Those kinds of comparison have meat; they're not just bikeshedding about which syntax to write imperative procedural/OO scripts in. I commend the author's choice of learning Go (although I'm not familiar with it myself).
I think the procedural/OO scripting languages will be around for a while to come, but I think their niche is in public-facing applications (usually Web sites, but Python certainly has a heritage of desktop GUIs and CLIs). Certainly the use of REST services is making it easier to use languages for those jobs they're good at; for example, using Go for data crunching, while Web site rendering is done in PHP.
Re: PHP Sucks
#90Earlier quoted context omitted.
I used to like Laravel, but lately it feels so enterprisy. There is a lot of boilerplate in Laravel today and it was changing too fast for me to keep up with it.
Have you tried Yii at all? In my most recent (side) project, I'm doing a Yii2 website and I'm feeling like it's not enterprisey enough. I have to go out of my way to figure out the best way to split things apart (which, I guess is good because it doesn't actually make that difficult for me at all - it's just something I have to choose to do)