Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
It's true.
I hated it from the moment I saw it 12 years ago, even though I didn't know it.
Then I was forced to learn it. I became good at it. I became very good. Most of those 12 years I've been using it heavily.
I still hated it.
Still do.
I'm glad I don't work with PHP any more. -
@linuxxx
1. Very, very very very bad programming practices in guides and books 6-8 years ago, which produced a toxic community of people who are very shitty coders because of it.
2. $this->sucks_ass(SUCKS_HARD); <- why is this notation even a thing?! It's ugly as hell and inconsistent.
3. Its continuing phobia of methods in favor of global functions for doing most of the stuff with everything. It's a mess of stupidly abbreviated names.
4. XDEBUG was always crappy to set up. Now it's easier, but far from seamless. Basically debugging is crap.
5. It was always very opaque to what it's doing behind the scenes. Regardless of server configuration I still get unexplained DB connection limits (I've increased all documented limits ten-fold without any changes), there are tons of zero-day compatibility bugs caused by shitty practices, and if I delete some DB schemas, php-fpm stops responding completely even though no requests need to be made to the DB. Stupid stuff like this... -
@linuxxx I don't really have to explain what is wrong with php, but the most happy and well paid devs work with java, c# and f#, at least the devs i i know in person. Most php devs are paid less than frontend devs and they seem everything but happy about what they do.
So, i consider it as a good advice. 🙂 -
Conrad7377yWell, I guess school got me started on php. I was ruined by the education system. Their fault
-
No. I will always love it, no matter what. I can see its many flaws, but it helped me realize I could be worth something and have a software developer carreer. Without it, I would not be programming at all.
I totally moved to C# and ASP.NET development but still, the love I feel for good ol' php will never die. -
PHP seems to evoke similar reactions amongst developers to vim vs nano or spaces vs tabs. People love or hate it, but it doesn't make it a less viable option.
Personally it's my job to write PHP and I enjoy it. Sure, I can see the inconsistencies, but you learn them and then they don't really matter. -
@AndSoWeCode
1. Fair point.
2. That's an opinion, not a fact. I actually really like that.
3. I don't find this an issue myself but hey, opinions be opinions :)
4. Never used it so can't say much about it.
5. No clue why you're having those issues, never had db related issues myself. Connection limits are handled by the database itself as far as I know.
Thanks for providing arguments!
@superuser Just one note, well paid doesn't mean a language is better. Cobol devs earn shitloads but that language...
I personally dislike Java and freaking dislike C#, I do everything in php, bash and node/js :) -
@linuxxx all i said is that it was a good advice. Also Haskell is a great language but i m never gonna touch it for development.
-
dfox426037y@linuxxx I completely agree with your points to @AndSoWeCode.
At my current company we use PHP on a massive scale (with MySQL) and never have any issues with PHP itself. There’s lots of things that could be causing those issues, but blaming PHP for other environment factors seems a little unfair. I work in a fully dockerized PHP/Nginx environment with a multi-part deploy process and web heads that connect to a large MySQL cluster and a bunch of microservices and everything is pretty seamless. I’m sure problems exist and come up, but what languages work perfectly with large MySQL deployments with no configuration?
I’ve wrote this many times before, but I think the whole “PHP community is full of shitty coders” argument is also kind of silly. Every language has its huge share of shitty coders. One of the funniest arguments I ever heard was when one time someone tried to tell me certain languages prevent you from writing shitty code and they mentioned Java. I write shitty Java code all the time because I’m inexperienced in it and don’t put much care into the structure. You can do that with every language.
But yeah, definitely some good points here, and at least some actual arguments which is good to see. -
@dfox Haha good ones yes, thanks!.
Although not programming, you should see me with CSS, it works but looks like shit :P -
@dfox @linuxxx
I've been developing data warehouse applications with reporting.
With a huge amount of data moving around, tables and schemas being renamed / deleted / moved, in about 10% of these moves, php-fpm simply stops responding, until I restart the service. Not using any particular ORM, just pure PDO.
And quite often, connections are closed with connection limit errors, even though I've played with configuration (including DB configuration) quite a lot with no effects. And it works just fine on any other platforms.
...
I've used PHP for more than 10 years now. A bit less in the last 4 years. I tried replacing it with NodeJS and damn that was a disaster. But when I picked up C# and Python, lots of things were just simpler to write, debug, configure and scale, even with very little comparative experience.
Because, foremost, debugging is natural on those platforms. They're also stricter in typing, which lets you fail early when you make a mistake, instead of obscure bugs. -
@dfox the worst thing in php (and every other scripting lang) for me is the debugging. I will never use a scripting language in backend because its harder to test and debug, with c# even if something happens in production i can recreate the exact same chain of actions with the same values on my machine and find and fix even the most weird bug.
This leads to a deterministic system where every single case is covered and you can trust your system. -
C0D4669027yOk, long time PHP dev here (I started back when .php3 was a thing) so I think I can carry some weight in this one.
@AndSoWeCode
1) I can’t exactly argue with that, a lot of sources for tutorials were shocking and never gave an ideal for best practises, it took my self a long time to find out about the PSR standards as it was a one liner some crumby book I read that mentioned it but didn’t go into them.
2) it’s a thing because the community made it a thing, personally I hate it, especially when devs get creative in the naming conventions.
3) although a lot of the global functions have been slowly growing into classes of their own, there is a long way to go for that. PHP5.6> has been a good start to this though.
4) I stopped using xdebug for that reason, seriously a error log and a little know how is all you need to debug most problems.
5) Sounds more like infrastructure issues rather then a PHP / PDO issue.
@superuser
That’s just biased in its natural form, I’m a PHP dev at heart, I also do Java, Python and now Salesforce development, a happy dev is someone who knows what their doing and how to get it done right with their tools at hand. Also the paid more is really business centric seeing as a lot of PHP devs work on small scale sites or cms frameworks, I guess I wouldn’t expect a large pay check for maintaining a Wordpress site?
On top of this, yes PHP has always been a wild beast and if you can’t tame it, it will send you in circles.
But I’ve always said, don’t let PHP be your first language, as it’s a language not designed to hold your hand and some what enforce best practices,
but due to the very low learning curve required to get something easy working, a lot of people do it first.
Now for the inconsistent global functions, naming conventions and argument ordering, if you can’t handle them, write a wrapper class to sort that problem out for you seeing as the community won’t do it anytime soon. -
C0D4669027yDamn I ran out of characters
...
Due to the incredible amount of backwards compatibility PHP extends too, I don’t get the need for PHP5.1 or less but someone decided it was a good idea to keep 15 year old systems running on outdated versions.
I saw something about php being single threaded, yes by default it is, however you can use the multi-thread version to deal with that which kind of debunks that theory.. or was that another rant, I think it was🤷♂️
To many anti-PHP rants this week to keep up 😂 -
devTea219107y@superuser eh c# for backend and API services for js to consume isn’t that bad, what your thoughts about it?
Related Rants
-
CowboyBebop16"Don't give your 100%. Never. Once you gave, managers will start expecting more than that." - My mentor.
-
linuswillner15(Q: How much are you allowed to Google as a developer?) “You’re allowed to Google as much as you want. Th...
-
ripbit18Never delete code immediately. Always comment it out first.
Stay away from php, no matter what.
rant
wk103