7 ms·
I have used PHP for years. Like it. Have accomplished some nice things with it. Think it's evolved nicely in recent years. Feel it's a great tool for particular
by brandon272 5y ago
I have used PHP for years. Like it. Have accomplished some nice things with it. Think it's evolved nicely in recent years. Feel it's a great tool for particular problems. Will continue to use it. Will always be open to alternatives.
Will never understand why some people find that so offensive and will tell you that you mustn't use it or imply that you are ignorant or stupid for using it.
- cityzen 5y agoand the best part is they're probably javascript developers that don't understand the hell they're living in.
- crate_barre 5y agoNow, why’d you have to get JavaScript involved? Can’t something else be a punching bag?
- askonomm 5y agoSo your response to the haters is to be a hater yourself? Why can't we just get along?
- todd3834 5y agoPretty rare to find someone who writes a lot of PHP without also writing a lot of JavaScript. If there are JavaScript engineers who’ve never touched PHP then they probably don’t have much feelings about it at all
- klyrs 5y agoI haven't used PHP for years. I did some Python-based web stuff for a while. Python is a daily driver, but I still reach for PHP when I want to make something that responds to HTTP requests.
- rp1 5y agoI haven’t used PHP in over a decade. I can never forgot how much PHP got wrong in terms of how application development on the internet would happen. The ergonomics of using it were just… bad compared to other frameworks that came on the market. I remember when rails came out and it was so mind blowing compared to PHP. The language was certainly useful for a time, and I’m sure the language has progressed since, but switching to PHP still feels like it would be a huge step backwards.
- Master_Odin 5y agoComparing Rails to PHP is unfair given that one is a framework and one is a programming language. Compare PHP and Ruby or Rails and Laravel to keep things apples to apples and oranges to oranges.
- rp1 5y agoA lot of people 10+ years ago were building websites by interpreting PHP and using the output as HTML. The language (at the time) seemed to encourage this. I agree that PHP is not a framework, but it seemed to have some opinion on how HTML was to be generated, which most languages don’t have. Also rails is 7 years older than Laravel, so my point still stands that PHP was behind the curve.
- jensensbutton 5y agoIf your standard is rails then literally everything in every language before rails was "behind the curve". Currently PHP has frameworks that have caught rails, but Ruby's perf is still garbage.
- rp1 5y agoDjango was released shortly after Rails. Ruby and Python developers _needed_ to build something like Rails and Django because those languages didn’t promote the same type of script-as-html pattern that PHP did. Had more thought gone in to serving websites, PHP might enjoy more popularity today. PHP had the first mover advantage after all, but frameworks built in other languages were purely better in almost all categories.
- timeon 5y ago10+ is not that long time ago. There was already Zend Framework. And for some basic API using framework may be overkill anyway.
- perttir 5y agoPhp has developed a lot in a decade. Lots of new good things in php7/php8. The typecasting is way better than before, but it still allows you to be more "dynamic" if you want to.
- smt88 5y agoFor people of a certain age and job history, the worst code they've ever inherited was written in PHP. I think JS can be worse. There are things that are possible with dynamic languages that are literally impossible with static ones. So think of PHP less as a "bad language" and more of a code smell.
- idoubtit 5y agoI don't think any JS code can be worse than old PHP code. I've had to deal with legacy software written with PHP4. I was to port it to PHP7 since it was not compatible with PHP5.4+. The code used "register globals", meaning that variables were created on the fly from the parameters in the URL, the POST form data, and the cookies. Requesting `index.php?something=X` implied `$something = "X";` in the global scope at the beginning of "index.php". And since the global scope was not limited to a file, tracing a variable through files and side effects was a nightmare. Even understanding the code intent was often hard! Before PHP7, there were many elements of the language that were meant to simplify its usage, but had awful consequences in many cases. Even more because it bent the PHP community toward a quick and dirty process. "Magic quotes", the automatic escaping was one of those abominations. For any request input (e.g. POST form data), it added backslashes before single quotes. It was meant to protect data automatically in case it was inserted into a SQL request... It granted no security gain in this context, and was a mess for any other use.
- tlackemann 5y ago> I don't think any JS code can be worse than old PHP code. I'm currently working for a company where all our microservices were written in Node.js by juniors. JS can absolutely be worse than PHP
- 0des 5y agoI've heard of JS referred to as "PHP with cooler shoes". I smirked.
- 3np 5y agoDon't forget how <??> is built-in and was heavily abused to create insecure, incomprehensible spaghetti messes. You'd have to try really hard to make callback labyrinths in JS match the mess that came out of the above combined with runtime-as-template-engine. This was basically idiomatic at the time.
- enchiridion 5y agoYou’re writing style is unique and grabbed my attention. Any tips to write like that? You didn’t use “I” at all, but it seems likely there are some other rules going on here.
- rat9988 5y ago> Any tips to write like that? You notice the pattern. Mimic it. Struglle with it. Persevere.Endure. Will you reach perfection? Maybe not. No problem. Satisfaction is few layers below.
- tasty_freeze 5y agoNo doubt there are people reading this message who speak Japanese who will correct me, but ... 30 years ago I studied Japanese a little bit. One interesting feature of the language was that once a subject was introduced, there was no need to restate the subject if it hadn't changed, resulting in paragraphs like the one which intrigued you. "I have used PHP for years." The first sentence establishes the subject is "I". "Like it." etc Because this sentence doesn't have an explicit subject, it is implicitly the same one, "I". As I recall, "wa" and "ga" were the Japanese particles which established new subjects. Say you wanted to talk about Bob's new car, you'd say something akin to "About Bob's new car, is expensive. Arrived last week. Has poor gas economy."
- CrazyStat 5y agoThis is called pronoun dropping [1] and happens in quite a few languages, including Japanese as noted. I had a friend in college who would always point it out (in English, where it's not very common). I still notice it often years later and I'm pretty sure it's thanks to her making me aware of it. [1] https://en.wikipedia.org/wiki/Pro-drop_language https://en.wikipedia.org/wiki/Pro-drop_language
- hellojesus 5y agoInteresting. The Chinese examples on the wiki page sounded completely natural to me and are in accordance with how I speak/interpret the language, but I never realized I was dropping pronouns due to their inference. Thanks for the insight!
- todd3834 5y agoI don’t find it offensive at all. I do, however, feel like the problems I worked on in many years of PHP were some of the least interesting projects of my career. It wasn’t the language’s fault necessarily but the types of things that language is most commonly used for? Also it was just a different time so PHP is possibly not the issue.
- echelon 5y agoHere's a choose your own adventure for people new to the field. Pick something you want to build, then see which languages are the best suited. If you want to build several things, see which languages are the most recurring and versatile: - Web frontend: Javascript/TypeScript - Web backend: Javascript/TypeScript, Python - Performant backend (where you manage threads and queues): Go, Java, Rust - Machine learning: Python - Command line scripting: Python - Command line tools (binaries, eg 'ripgrep'): Rust, Go - Mobile: Kotlin, Swift - Systems/bare metal: Rust (discourage C/C++) - Desktop games: C#, C++, GLSL, Rust (in ten years) Mix and match. The safest three to learn that give you the most flexibility are probably Javascript/TypeScript, Python, and Rust. You can build almost anything with those three.
- CyberFoxar 5y agoYou might also want to know a few languages were you're sure to get a job, and right now, it seems that Ruby on Rails and PHP are some really safe bets, compared to Python. Sure, Rust is _fun_ but there's little demand for it right now in the market.
- herbst 5y agoYou can build almost anything with any language. I've done shell scripts in PHP. Mobile development in Ruby, JS and haxe. Web development with Go. Nothing is stopping you, and if you know the language it is usually not to weird either.
- pjmlp 5y agoRust is great, but if one is looking for a job in systems programming, C and C++ is what gets one hired, regardless of their flaws. Recent example, while Android has adopted Rust for replacing their bluetooth stack, the newly introduced Android Games Development SDK focus on C and C++. Or Microsoft, despite all their security speech, Azure Sphere OS and RTOS only support C on the official SDK, and the new WinUI components are all based on C++. And naturally anyone wanting to contribute to the Rust compilers, most likely will need to brush up their C++ skills if they intend to mess with GCC or LLVM internals.
- 5y ago