Live data from Hacker News

25 Years of PHP

jetbrains.com

41–50 of 426 posts

Re: 25 Years of PHP

#41
post #20

I wish more digital subscription models were more like the jetbrains one. If you paid for one year continously they handle it like you own that specific phpstorm version, even if you cancel your subscription. That said, I wish I could subscribe without having a company ._.

What do you mean? They do offer licenses for individuals, and I've had a personal license for over seven years now.

Re: 25 Years of PHP

#42
post #6

PHP is damn fast now, no joke. And with all of the modern features it's actually not so bad to work in. I'm becoming increasingly puzzled every time I see PHP hate now, especially when I read tired comments like "just use rails". Laravel is arguably as good or even better than rails at this point, and PHP 7+ is definitely light years faster and lighter. One thing that still sucks is package management / composer.

What are the "modern" features of php? It looks like it's trying to shed it's dynamic nature and add types (with annotations etc). Also frameworks like Symfony / Laravel look more and more like java web frameworks to me. I'm not saying this is necessarily bad but there's nothing modern about types. Also, might make more sense to choose java if you need types.

The biggest advantages of PHP over Java are build and deploy times, so coding a php app is much more rapid. You can test your app right away, even after a single line change and get immediate feedback on the screen, which I think is important in web dev because a lot of it is visual. The other advantage is the run-time. Java has a slow startup time and when you redeploy then you need to stop/start your entire app. With php you can fix / update one part of your app without the need for a server restart. Another advantage is that php runs each request with a clean state, that means all the variables get destroyed after the request, helping to avoiding memory leaks, and possibly issues with concurrency which Java exposes. Types are great, but sometimes they can get in the way too and slow you down, (I still haven't figured out what those types mean). In all, development in PHP is so much faster and easier over Java.

Re: 25 Years of PHP

#43
post #9

Fine. After 20+ years of PHP development I'm going to give it a shot. Will be attempting to migrate from VSCode. Any tips for that transition in particular, or for setting up PHPStorm in general? I have a subscription to Laracasts and plan on watching that series, but I'm not sure if it's outdated. Thanks!

Please do share your PhpStorm journey at some point. I installed it yesterday after trying out Visual Studio Code for the Nth time and again being utterly unimpressed with having to use a GUI fobic editor in 2020. Everything feels clunky and when you start adding more complex plugins things really start to fall apart, like having to use a FTP plugin through the command line.

PhpStorm has its flaws [0] but so far I'm shocked by how much more productive I am with it as compared to Visual Studio Code. It's like having access to a wise dev who can point out flaws with your code, turning the IDE into a learning tool.

[0] The non-native UI of PhpStorm is annoying but not a major issue. I dislike how project centric it is but I like that you can configure almost every setting on a per project level. It's also very expensive for solo devs (edit: actually the monthly cost for individual use seems to be 8.9 EUR which isn't that bad).

Re: 25 Years of PHP

#44

[flagged]

> interns

> more than 10 years ago

How that looks to me: Wow, that application has provided so much business value (over a decade worth) despite being designed by less experienced software engineers. PHP must be a great language.

Re: 25 Years of PHP

#45
post #9

Fine. After 20+ years of PHP development I'm going to give it a shot. Will be attempting to migrate from VSCode. Any tips for that transition in particular, or for setting up PHPStorm in general? I have a subscription to Laracasts and plan on watching that series, but I'm not sure if it's outdated. Thanks!

I wrote a blog post on my most-used shortcuts in JetBrains' IDEs (=> also PHPStorm), maybe this is useful for you as well. It was discussed here: https://news.ycombinator.com/item?id=22925484

Re: 25 Years of PHP

#46
post #6

PHP is damn fast now, no joke. And with all of the modern features it's actually not so bad to work in. I'm becoming increasingly puzzled every time I see PHP hate now, especially when I read tired comments like "just use rails". Laravel is arguably as good or even better than rails at this point, and PHP 7+ is definitely light years faster and lighter. One thing that still sucks is package management / composer.

> One thing that still sucks is package management / composer.

How? I mean, what are the problems with it?

Re: 25 Years of PHP

#47
post #32

I wrote a lot of PHP from 1999-2008. First as a hobby, then professionally. From 20 LOC guestbooks to payment gateways used to process millions in payments. It wasn't until recently that I was sure I'd written more code in any other language than PHP. These days I'll occasionally poke around with it or patch a bug, but that's about it. Is it a perfect language? No. But which language is? (I can hear the Lisp crowd gr…

> Stuff that's in comments SHOULD NOT AFFECT RUNNING CODE.

To clarify, comments never affect running code in PHP, ever.

What's often done however is that tools like ORMs, or web frameworks offer a 'compile' step that parses these annotations (just like it's common in Java) and dumps a PHP file that maps things in the annotations into actual PHP code.

For example, you can use it in Symfony to wire routes to handling functions in controller classes; or in Doctrine to help the mapper wire Entity classes to database tables.

If you don't like the idea of preprocessing annotations, you can totally not use them and configure everything using external YAML/XML files.

Re: 25 Years of PHP

#48
I've been working with PHP for a very long time and apart from web it is also very good at writing shell scripts too.

One of my recent project called 'howdoi' (1) is written in less than 70 lines of code (ignoring ws) - no libraries, no deps and backward comptabile to 5.0. Just copy-paste the file and it's go! If you know how to use it, it's really useful language.

(1) https://news.ycombinator.com/item?id=23230157

Re: 25 Years of PHP

#49
post #37

What ever happened to the PHP-FIG? I noticed in the timeline projects kept dropping from it in the past 2 years. It seemed to have a lot of momentum for a while producing PSRs that were very widely adopted.

Afaik after the whole PHPixie scandal, they got backlash but the PSR standards they adopted are still in use. PHPixie thread: https://groups.google.com/forum/#!topic/php-fig/cjLBp2weYaA

Oh my. I lol’ed at the comment:

> A big +1 to what Robert said. Let's not be the PHP Drama Group or the PHP Court of Social Justice.

It seems like all these “groups that have arbitrary mechanisms for becoming a member and have some sway in the wider community” eventually end up becoming a giant ball of drama and controversy.

Re: 25 Years of PHP

#50
post #6

PHP is damn fast now, no joke. And with all of the modern features it's actually not so bad to work in. I'm becoming increasingly puzzled every time I see PHP hate now, especially when I read tired comments like "just use rails". Laravel is arguably as good or even better than rails at this point, and PHP 7+ is definitely light years faster and lighter. One thing that still sucks is package management / composer.

What are the "modern" features of php? It looks like it's trying to shed it's dynamic nature and add types (with annotations etc). Also frameworks like Symfony / Laravel look more and more like java web frameworks to me. I'm not saying this is necessarily bad but there's nothing modern about types. Also, might make more sense to choose java if you need types.

Whatever the language there is always a group of people slowly turning it into Java. It seems almost impossible to say no to new features.
Post reply on HN