Live data from Hacker News

PHP in 2023

stitcher.io

21–30 of 285 posts

Re: PHP in 2023

#21
post #2

I used PHP in mid-2000s, and then again in ~2017. By 2017, with the power of IDEA/WebStorm at my hands, it felt pretty much like developing a Java or a C# application: the stuff you needed was there, at your fingertips. And I still prefer PHP docs over pretty much any other language doc.

As of PHP 5, it lost its way and started imitating the Java OO model with a worse botched-on syntax. PHP 4 used to be a compact "hypertext preprocessor" with many built-in groups of functions, enabling you to process forms, talk to databases or process images without much code.

How has PHP lost its way?

It grew up from a poorly thought out hacky scripting language to a major programming language. All the nasty code you could write in PHP 4 or 5 is still possible, but everyone will look at your code and laugh.

Re: PHP in 2023

#23
post #5

I used PHP in my university days, 20 years ago, and went on to build a few websites with it that I still run today e.g. https://caption.me It was a fantastic student language - the docs were great, the code was simple and imperative, there was loads of prior art online. It was empowering to tweak code and see immediate results in the browser. These days I prefer the strictness and ecosystem of Scala on the back-end,…

If you are the sole developer working on migrating the project and you want to have the frontend in React.js why not use Node.js/TypeScript instead of Scala for the backend? This would save you from context switching between two languages and consequently increase the development speed.

Also why the rewrite? If it works (in PHP) it works. Perhaps instead you could maybe add some frontend JS for better caption UI/UX?

Does everything have to be done in React nowadays, as opposed to plain static HTML? (Speaking as a React/Node dev myself)

Re: PHP in 2023

#24
post #3

used php in 2015, decided that it's not that nice. last couple of months, I've been banging my head with php7. granted, it's a legacy project, but it is still the same php 7-8 years ago.

if its a legacy project then of course it would be the same php from 7-8 years ago, what exactly were you expecting?

if you want to try modern php then start fresh or put in the work updating the legacy. its no different than being given a jquery project from 7-8 years ago and expecting a modern experience

Re: PHP in 2023

#25
post #9

PHP was my first language back when I was a teenager in highschool - it all started because I wanted to get some data from users and store it (I just knew basic HTML and CSS back then), when a friend mentioned he used a PHP snippet to send an email from a website. That sounded like magic to me so I bought a book on PHP and my mind was blown by the possibilities. Several websites and years later I had a pretty good un…

Hey, I'm the author of the post. A while ago I made a video where I built a small but serious hobby project in PHP with Laravel. It was a five hour recording, but I condensed it into a commentated 20-minutes timelapse: https://www.youtube.com/watch?v=mmtVkDh9RGw If you don't have the time to watch it, you can also check out the open source code of that project: https://github.com/brendt/aggregate.stitcher.io I still…

Which leads me to start to think if there is a way to make timelapse videos that filter out some of the too quick movements, like windows and dialogs opening ... to make you mostly see how the code grows. App idea perhaps? :)

Re: PHP in 2023

#26

The video from that site (also https://youtu.be/x9bSUo6TGgY at youtube) is really quite well done. I wish more language comparisons were done in this way, with two speedy minutes in an editor accompanied by taut voiceover. Very impresssive!

Thanks! I'm the author of the post and creator of the video :) Appreciate the kind words.

It is tidy and efficient. One question: Are you saying “docblocks?” I’ve never heard of this.

Thanks!

Re: PHP in 2023

#27
post #9

PHP was my first language back when I was a teenager in highschool - it all started because I wanted to get some data from users and store it (I just knew basic HTML and CSS back then), when a friend mentioned he used a PHP snippet to send an email from a website. That sounded like magic to me so I bought a book on PHP and my mind was blown by the possibilities. Several websites and years later I had a pretty good un…

> with no CI/build/deploy issues

I miss those days.

I think the amount of front end building we do for the web nowadays is absurd. We transpile everything - JS, CSS HTML, and then we bundle them in odd ways to circumvent all kinds of issues. The way we make webpages is so disconnected from the technologies that browsers offer us.

Makes you wonder when people are going to realize that we're way past serving static pages and don't need the next big front end tool, we just need a better way to run actual applications in the browser.

Re: PHP in 2023

#28
post #25

Earlier quoted context omitted.

Hey, I'm the author of the post. A while ago I made a video where I built a small but serious hobby project in PHP with Laravel. It was a five hour recording, but I condensed it into a commentated 20-minutes timelapse: https://www.youtube.com/watch?v=mmtVkDh9RGw If you don't have the time to watch it, you can also check out the open source code of that project: https://github.com/brendt/aggregate.stitcher.io I still…

Which leads me to start to think if there is a way to make timelapse videos that filter out some of the too quick movements, like windows and dialogs opening ... to make you mostly see how the code grows. App idea perhaps? :)

You could probably use GIT commit history as a data source?

Re: PHP in 2023

#29

Earlier quoted context omitted.

Thanks! I'm the author of the post and creator of the video :) Appreciate the kind words.

It is tidy and efficient. One question: Are you saying “docblocks?” I’ve never heard of this. Thanks!

Yeah, doc blocks. It's a name that originated within PHP a long time ago: https://docs.phpdoc.org/guide/guides/docblocks.html

Re: PHP in 2023

#30
I don't really keep up with all the new features as it suits me fine. In combination with vue it is so powerfull.
Post reply on HN