Live data from Hacker News

25 Years of PHP

jetbrains.com

81–90 of 426 posts

Re: 25 Years of PHP

#81
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!

There’s a fairly good plugin for JetBrains IDEs called “Key Promoter X” that reminds you whenever you do an action (click build, open a terminal, change directories) of the keyboard shortcut to do that same thing. It’s very handy for getting into the workflow quickly.

Just installed this, it's fantastic! Thanks!

Re: 25 Years of PHP

#82
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…

> The only ceremony you need to write executable code is the This is a really underappreciated aspect to development in general and web development in particular. There are (or at least were) an awful lot of "shared hosting" providers which are cheap, convenient, and run PHP and CGI only.

Re: 25 Years of PHP

#83
post #78

Earlier quoted context omitted.

The speed is the main reason I decided to experiment with building a Node.js module last week that allows you to use PHP as a templating engine for Express apps: https://www.npmjs.com/package/php I had guessed that PHP might be faster than mainstream JS-based templating systems like EJS and in my tests so far in an app I'm building it appears my guess was right. Even with the overhead of serializing and deserializing…

Did they seriously take the "php" namespace in the registry?!?! That shouldn't be allowed.

Originally the php module on npm was used by a separate project that attempted to implement a PHP parser in JavaScript for Node.js, but was never finished. One work in progress version was published, then the project remained stale for 8 years. I spoke to the owner of the package and asked him to transfer it to me and he graciously agreed.

Re: 25 Years of PHP

#84
I started my professional developer career with PHP 5.2 I think end of 2006.

While the langugage design was garbage, I the developer experience was quite awesome.

This was a curse and a blessing. On the one hand it lowered the bar for many people to get into programming, on the other hand it led many people to believe they can do anything even when venturing in system designs that were much above their pay grade.

I switched to JavaScript in 2011 and again, it was mostly for DX.

The language felt more light-weight (no $ or classes), while it still had similar problems as PHP and being able to use it full stack eased context switching rather much.

Node.js deployments felt much slimmer than setting up PHP with Apache/Nginx too.

I still missed a bit of the "drop a source file in a folder and its an API" feeling.

Last few weeks I played around with Cloudflare Workers and that got me a bit of the PHP feeling again. I can simply say "This file runs at that path" and be done with it.

Re: 25 Years of PHP

#85
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've been recommending "PHP Inspections EA" for many, it adds a many more extra inspections provided the environment (PHP versions, extensions, etc) are configured correctly.

Re: 25 Years of PHP

#87
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!

There’s a fairly good plugin for JetBrains IDEs called “Key Promoter X” that reminds you whenever you do an action (click build, open a terminal, change directories) of the keyboard shortcut to do that same thing. It’s very handy for getting into the workflow quickly.

Thanks for this. I'm not necessarily aiming for mouse-free development, but I've known for years that I could be better with keyboard shortcuts. I had no idea this was a thing.

Re: 25 Years of PHP

#88
post #73
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…

Every time there's a story about PHP there's a comment like yours, and then in reply there's a comment like mine: Yes it's perfectly fine to use PHP if it's a productive environment for you. Of course it's possible to write good software with it. Of course a skilled developer will manage to do great things with sub-standard tools. Many extremely popular websites were and even still are powered by PHP, that's undeniab…

No one is claiming that PHP is and/or was without fault. The sentiment is that we built things that worked despite them.

Re: 25 Years of PHP

#89
post #19

Recently I have been thinking about moving my personal blog from Wordpress to a static site generator, because I don't allow comments or use Wordpress plugins. (Those who want comments can still use a combination of a static site generator and Disqus.) It occurred to me that once I did that, I could completely disable PHP on my Apache installation. It made me wonder how much usage of PHP out there is essentially a hi…

Static site generators are a niche market, whereas blogging is a mass market. The vast majority of WordPress users probably wouldn't know / care about static sites. WordPress is still significantly more convenient and user friendly for your average user

Does anything like Blogger still exist? Blogger was really easy to use back in the day, and even today, I'd choose it over Wordpress.

edit: Context: I used Blogger to publish to a paid hosting service via ftp

Re: 25 Years of PHP

#90
post #39

Earlier quoted context omitted.

> But neither the choice of language nor the lack of framework are to blame. This is partly true. It is possible to make something great with substandard tools. I suspect a master craftsman with a set of dull saws and blunt chisels using his shoe for a hammer will still have the skill to create something pretty good. But it will be frustrating, and most people aren't master craftsmen so what they will produce will be…

you mean your favorite language prevents you to copy paste code, have variables shorter then 4 letters and also fixes the bugs for you, let me know this cool language so I can try it. I am also sure that in your first years of coding your code had no issues similar with the ones you described.

> your favorite language prevents you to copy paste code, have variables shorter then 4 letters

"here's one place that PHP doesn't prevent poor quality code that is the same as other languages, and so all languages are the same"

No languages prevent these things (that I am aware of), but not all languages have the same number of edge cases that PHP has.

> and also fixes the bugs for you, let me know this cool language so I can try it.

I've written a lot of languages over the years, but right now I'm enjoying Go, which kinda does help prevent me from writing bugs with it's static typing, but also it's simplicity.

> I am also sure that in your first years of coding your code had no issues similar with the ones you described.

What's your point here? Noobs write bugs and bad code? Sure, we agree! But that doesn't mean that PHP is a good programming language.

Post reply on HN