Earlier quoted context omitted.
What's the point? You can use types in the vast majority of places in PHP and it works well, so I don't really see the point of that instead of contributing to the native typing system.
Javascript already set the precedent. If you don't like the way a language works, it's preferable to have a proxy language that does work the way you want that compiles to it, rather than accept the language for what it is and learn to work with it.
PHP in 2023
81–90 of 285 posts
Re: PHP in 2023
#82If 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…
Re: PHP in 2023
#83Earlier quoted context omitted.
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.
Maybe because there are already major programming languages at that level already, which arguably do things better: if you are going to have a Java-like OO model, then just use Java (and leverage its ecosystem, tooling etc). Whereas there is a niche for a quick-and-dirty scripting language for just getting something up and running.
Absolutely nothing about modern PHP stops you from writing like the crayon-muncher you were back in the early 2000's...
You just also have the option, to, you know, use battle tested libraries and work with cohesive community driven standards now as well.
Re: PHP in 2023
#84Earlier quoted context omitted.
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
#85I 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…
> 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…
Re: PHP in 2023
#86These days - I use swoole/openswoole with any PHP project. it brings connection pooling, async, concurrency, event loop, io parallelization and much much more.
Re: PHP in 2023
#87Why would a new project in 2023 choose PHP over anything else (modern Java, Kotlin, C#, etc.)?
Re: PHP in 2023
#88I 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…
> 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…
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 there's so much more nice things coming in languages that have been designed from the ground up to be nice to use.
I understand PHP's pragmatism, but can't find it pleasant to use TBH.
PS: we got arrow functions, but they stay limited to anonymous functions for instance...
Re: PHP in 2023
#89Earlier quoted context omitted.
Those functions are all still there. You can still do if you like.
isn't doing too well
Re: PHP in 2023
#90Earlier quoted context omitted.
Those functions are all still there. You can still do if you like.
isn't doing too well