8 ms·
just to chime in on this, modern PHP is nothing like what people remember from the pre ROR days, i still use it to this day and the major frameworks and libs ar
by kayoone 10y ago
just to chime in on this, modern PHP is nothing like what people remember from the pre ROR days, i still use it to this day and the major frameworks and libs are really well written to the point i feel some are even over engineered and almost looking like Java (just take a look at the latest Guzzle PHP Library)
- collyw 10y agoAs my PHP fluent colleague said to me - don't bother learning PHP or you will end up having to fix (our) Wordpress sites and thats a nightmare. We have a Python application, and while its not written well, the PHP sites we have seem to be a fair bit worse even the ones not done in Wordpress.
- dreistdreist 10y agoWordpress is horrible. Never going to touch that again (Senior PHP Dev myself) or anything else like it (Magento, Drupal,...). And yes there is a lot of horrible PHP code out there, writting by bad developers. I guess newer or not as accessible languages don't have as many bad devs as PHP/JS. But if you have good devs, I prefer a good PHP codebase to any other language that I have come across (I tried a lot of them).
- pthreadses 10y agoCould you elaborate a bit on what you prefer about it? I've heard this from a few people and would be curious to hear it fleshed out a bit.
- dreistdreist 10y agoIt has most of the OOP things that I want in a language (interfaces for one, looking at you python), few things still missing but hopefully coming soon (generics, nullable typehints). And it has sane nulls in my opinion, compared to Java at least. In the end good PHP code ends up looking like good Java code I think. But you don't have to worry about everything being nullable. But then horrible PHP code is something else... Luckily I don't really have to touch that very often.
- TheLarch 10y agoAround 2001 I felt jaded with the industry and determined to do whatever was expedient to earn money. That meant using PHP, because that was purportedly the place to be at the time. I have never felt so uninspired by a language. My overwhelming feeling from the get-go was that it was a collection of libraries, which would be fine -- but why create a new language? PHP has the rare distinction among languages of not containing any novel features or ideas. Not only that, but it borrows liberally from several other languages, resulting in an overabundance of syntax. Instead of a tool for attacking problems, it's a reheated leftover. There is not suggestion of a better or worse way to accomplish some goal. Finally, the original premise of PHP, interspersed functional code and HTML, is high on my list of really bad ideas. Code written in this style is doubly-challenged in terms of reuse and maintainability. Again, there is again no semblance of better or worse with this approach. If you had Richard Stallman and Linus Torvalds produce the same website with PHP, there would be very little in common between their approaches. Given the success of Facebook et al, I presume that the interspersed code/html thing has been superseded, and further that the egregious security issues in PHP have been fixed. But the picture in my mind's eye is something that lumbers along despite its thorough mediocrity. I will allow that making PHP adequately consistent and secure are impressive feats. Sincere question: how am I wrong here? ====== edit ====== Drop extra 'the'
- jdhawk 10y agoSince when did something need to have novel features or ideas in order to be productive? I'll counter that one of the main reasons PHP became such a used language (other than ease of deploy) is exactly the reasons you dislike it. There are multiple ways to do things - that coincide with the ways you do things in many other languages (which it steals from). You dont have to learn anything radically new to use it, and that makes it very easy to do things quickly.
- TheLarch 10y ago"Since when did something need to have novel features or ideas in order to be productive?" It doesn't. But if your language ideas are admittedly no better than the next guy's, what's the point?
- gremlinsinc 10y agoI'm a php dev, and as much as I try going to Rails/Django -- I keep coming back to Laravel. W/ Laravel + composer PHP finally grew up, wordpress is a hacky out-dated should-be-shot-and-replaced beast. The best way of modern web dev in my opinion is to use Vue or Angular for the frontend, and laravel as a backend. PHP 7.0 is extremely fast and proficient, and it's an easy framework to pick up. If you need anything more resilient server side then I'd recommend using a Golang or Elixir framework like Phoenix which has multi-threading.
- arenaninja 10y agoWhich is a shame. I recently started toying with C#, and most of the syntax is eerily similar to PHP7. Obviously the standard library is completely different, but so far I'm right at home with the core language (though I haven't explored more advanced features yet). Luckily I'm currently working with a PHP7 app, so all is good, but my next app will likely not be PHP at all.
- Practicality 10y agoThis is true, it seems like the different languages are starting to converge. C# and Java are converging as well. There are still major differences, but it's getting to be like bickering siblings rather than comparing unrelated strangers.
- busterarm 10y ago> As my PHP fluent colleague said to me - don't bother learning PHP or you will end up having to fix (our) Wordpress sites and thats a nightmare. This is my life right now... lol It's not so bad, but the frustrating part is when I talk to people in interviews about all of the great work I'm doing modernizing (the surrounding) WordPress infrastructure and the tools I've built for it, their eyes just glaze over. I frequently get told "you're a talented developer and you're wasting your time working at X". Well, at least at my job I get to remove technical debt constantly. I don't feel like that's the case at these places I'm interviewing.
- sotojuan 10y agoMy understanding is that the majority of PHP jobs out there are maintaining old, outdated, and bad codebases using an old version of PHP so a lot of people just don't bother.
- levelist_com 10y agoThere is probably some truth to this. Every single contract I have been offered in the past 2 years including the one I am currently working required PHP5.6 & 7 knowledge, git, composer, JS, the latest JS frameworks, etc. Start the job... PHP5.3 codebase w/ some old jQuery. Its an absolute nightmare. I have to go home at night and write in PHP7 just to maintain some level of sanity or I'd have to cry myself to sleep. The only thing that makes the job tolerable is that I was able to load xdebug on the dev environments (though it doesn't always work b/c of all the redirects - it still is good enough to get me 90% of the way there).
- SmellTheGlove 10y agoMy day job is no longer to write code, but I have a couple of projects I work on at night, so take my opinion for what it's worth. I have one project that's mostly static content and a couple of calculator forms. On submit, I an ajax call to post to a PHP script, it returns a json object with some data, and I display it. When I see PHP getting ripped, I always wonder, what am I supposed to use if not this? I know this is relatively simple, but my choices were to do the calculations in javascript or let PHP handle it - and PHP seemed to me as the right choice because I eventually may want to capture some of the input data, send it to a db, etc.
- mod 10y agoBasically any other backend is equivalent. Javascript (on the backend), python, ruby, anything. Not a knock on php on my part, PHP is equally suited. I would have personally probably chosen Flask (python).
- dismantlethesun 10y ago> over engineered and almost looking like Java (just take a look at the latest Guzzle PHP Library) Guzzle doesn't look that bad. It looks like requests from Python, but you have to create a client first. > $client = new Client(['base_uri' => 'http://httpbin.org']); http://httpbin.org']); > $response = $client->get('http://httpbin.org/get'); http://httpbin.org/get'); Or in Python > response = requests.get('http://httpbin.org/get' http://httpbin.org/get')