Live data from Hacker News

PHP in 2023

stitcher.io

91–100 of 285 posts

Re: PHP in 2023

#91
post #74
post #53

Earlier quoted context omitted.

Why would anyone in 2023 use Java or choose to be locked into Microsoft?

Why "locked into"? When choosing JavaScript, you're locked into JavaScript (and Ecma International), when choosing Kotlin, you're locked into Kotlin (and Jetbrains). You're always "locked into" the language and its ecosystem, no matter what you choose. I don't find that to be a real argument.

In the front end you have no choice but in the backend you have all the choice into the world. No you’re not always locked in the backend if you have a decentralized system where each service can be based on a different language but yea, I don’t like Java or Java like languages so I will never use especially one maintained by microsoft.

Re: PHP in 2023

#92

Earlier quoted context omitted.

> Your comparing to React which is not a language or in the same domain is confusing and makes me doubt your credibility. They both render HTML and do it in a very different way.

That's such a strange statement, you can compare PHP and React because they both can return a HTML string? Even though one is built entirely within another language, and it isn't is not a "language". More of a toolkit. Same as say Symfony html framework is.

This is why I stopped posting on the internet people will twist and turn stuff for reasons beyond me. It’s like pulling teeth.

Re: PHP in 2023

#94

Hi, curious to try new version of PHP. Do you know some good tutorial to setup development environment?

Laravel comes with Sail, which is a ready-to-go Docker install. Up and running in a couple of minutes if you've got Docker installed already.

Re: PHP in 2023

#95

I used to work way back in the day on PHP too, but even though I'm sure this will be downvoted, it's really sad people still take it seriously as a language in 2023. There's nothing remotely elegant about it. It's not expressive or programmatically succinct in the way Ruby is. It's not beautifully well thought-out the way Python is. It's not fast and modern in the way Rust is. It's not elegant or composable or client…

we should show this comment to facebook that uses hack (php originated lang) in millions of files to run their little website and infrastructure. php isn't bad. just got a bad rep. many langs got quirks. some more than others. but php has more web production success story and usage than most.

PHP had design flaws (many of which have been addressed since the 5.x days), but what language doesn’t?

A significant cause of it’s bad rap is touched on briefly in this article, Wordpress.

Even back in 5.3 days, you could write elegant and scaleable code, it just took work to do. At a former employer using PHP 5.3 on 2005 era hardware, we could do 500+ req/sec per machine with an average response time under 100ms and a P99 response time of under 250ms, with a zero downtime SLA and hundreds of millions of requests per day. Yeah, it wasn’t easy, but it worked.

As a dear friend used to say, PHP is a ball of nails. You throw it and it sticks. Just exercise care when picking it up and all is well.

Re: PHP in 2023

#96
post #74
post #53

Earlier quoted context omitted.

Why would anyone in 2023 use Java or choose to be locked into Microsoft?

Why "locked into"? When choosing JavaScript, you're locked into JavaScript (and Ecma International), when choosing Kotlin, you're locked into Kotlin (and Jetbrains). You're always "locked into" the language and its ecosystem, no matter what you choose. I don't find that to be a real argument.

Speaking of which, how good is .NET on Linux nowadays?

I know it was possible for a long time (with the release .NET Core), but heard it was kind of broken/cumbersome on Linux. Maybe now it's easier to just develop an ASP.NET app, host it on Linux and use Posgres/Mysql instead of SQL Server?

Re: PHP in 2023

#97

Earlier quoted context omitted.

> I used to work way back in the day on PHP too, This is your issue - PHP Modern PHP (with a framework like Laravel or Symfony) is probably one of the most productive ways to build web applications. > It's not beautifully well thought-out the way Python is. This is definitely an interesting take... Python hasn't even solved package management yet. And the 2.7 => 3 migration is probably the most famous example of maki…

I'm on PHP 8 and I feel the same as parent. Sure, there's been a lot of progress since the PHP 5 days, but the core of the language has been left mostly untouched by design, and we haven't seen the kind of drastic moves like JS moving to ES6 syntax. It's a matter of taste, so there's no absolutr truth. I hate PHP's function and property access syntax differenciation and wildly prefer ruby's approach or instance. And…

The one feature on PHP that I wish was more commonplace is the `use` keyword in function expressions as it is one of the few ways to limit what names are in scope at a given point in the code

IIRC Rust's `mod` declarations can behave similarly.

Re: PHP in 2023

#98
post #45

Earlier quoted context omitted.

I’ve made a few “serious” projects with PHP and has been great, I never feel like I’m fighting against it to do what I need to do, the code can be very concise, its very fast and has a lot of batteries builtin. Python is not beautifully well thought out, the syntax is awful and the version conflicts make it a mess. You’re comparing to React which is not a language or in the same domain is confusing and makes me doubt…

React isn't a language, it's an elegant pattern layered on top of (Java|Type)script which are languages. Not sure what versioning conflicts there are with Python but there are a lot of community solutions in the form of pyenv, virtualenv, etc. Python is well thought-out, imho, but I think it can take a certain type of person time to realize it. I used to hate it but the way I ultimately came around to understanding i…

React with JSX can be pretty close to being a new language+runtime (just like Svelte).

Re: PHP in 2023

#99

It's been 10 years since "PHP: a fractal of bad design" [1] was written. It's remarkable how the language evolved, and how many of the issues mentioned have been fixed and improved over the last ten years. 1. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Many of the statements in that article were misleading or outdated already in 2012, though. E.g. the part about PHP being tied to Apache… At that time I had been using php-fpm behind nginx for years.

Re: PHP in 2023

#100

If you are thinking about building a web application, take a look at Laravel. I not a huge PHP user, but Laravel is always on the top of my list for building web applications. It's the greatest web framework to ever exists, even better than Rails IMHO. The ecosystem around Laravel is really incredible and unlike any other framework. They have libraries for every stage of a web application from taking payments all the…

Were building some internal tools for customer service on Laravel's Orchid package and its the first truly RAD I've had in php that doesn't hold me back. Building interfaces is a pain and I lost touch with Javascript a decade ago, but it handles all of that for you.

Highly recommend

Post reply on HN