Earlier quoted context omitted.
Quoted post unavailable.
> I've written code that uses ReactPHP, and I can't see why every lib you use needs to be developed for ReactPHP. My guess is that you're an inexperienced dev. Not OP, but perhaps every library is a bit of an overstatement. But, as most PHP code was historically written under the assumption that blocking is fine, potentially any library you use could inadvertently block your event loop.
PHP in 2022
301–310 of 318 posts
Re: PHP in 2022
#302PHP is my go to language for building simple backends that store data as json in a file and synchronize access using flock(...). There are a ton of cheap hosting providers that support PHP and all you have do to is copy your files over and everything works. I love to focus my energy on building a great frontend with React or Vue.
You have any good simple examples of your backend? Sounds like what I've been attempting to explain to others. How many concurrent requests and what size of data can you run with a setup as described?
Re: PHP in 2022
#303I was a php developer for some time two years ago, before switching to go. I was mainly solving high performance parallel processing and distributed problems. There are things like ReactPHP which are an awesome achievement, but still every lib you use needs to be developed for ReactPHP. After learning about go and goroutines I only find it painful to solve these problems in PHP, even using ReactPHP.
Quoted post unavailable.
Like written above my statement was meant like: there are people out there, the are so in love with php, that they would (ab)use it for everything. I also know it is my fault to hired with these guys in the first place, however it definitely teached me how to not do things.
Re: PHP in 2022
#304Earlier quoted context omitted.
> I think that says more about your particular mental model of programming than about programming in general. Well, I originally started programming only using dynamic types. Then I moved to typed languages, and I could avoid whole categories of errors. I don't see it as dogma, I think typed languages are just qualitatively better at creating software. I also think this is starting to become industry experience, as e…
Categorically better for everything and not categorically better for everything you write ? How about for the type of task PHP is often used for? A nearly default CRUD web app w/loads of fields and tables? Rapid prototyping? How about a bunch of simple, standalone interface interactions in JS? The extra grammar won't provide much architectural or conceptual clarity in those super common coding tasks because they're a…
For everything.
As I mentioned, I started out using dynamically typed languages. I don't agree with your idea that types somehow make it harder to develop things quickly--even the throwaway things.
With types I get to grips with a new API quickly via autodiscoverability, and types provide guard-rails to know I'm using the API properly.
With types, I can avoid whole categories of errors, as even the "simple" things like, for example, processing a CSV file can mess up, when someone has accidentally entered a date instead of an ID and that ends up failing for the user.
It's not dogma to have an opinion that types provide a qualitatively better programming experience all around.
Re: PHP in 2022
#305Earlier quoted context omitted.
> I'm curious what is the value proposition of the latest PHP version(s). I think more and more people have started to realise that typed languages make better, more reliable software. The incremental additions to PHP's type system are just a move towards this, I think and can be seen in other languages such as Typescript. I'm just not a fan of dynamically typed languages anymore, even for small scripts. > Why would…
This static-for-everything trend is absurd. Compiling one-off scripts? Give me a break - they're not called scripting languages for nothing.
Re: PHP in 2022
#306Earlier quoted context omitted.
I started at 16 and I'm 34. Went from working on gaming websites to running giant ERP backends for mobile apps, web apps, and api users in high throughput environments. All I need to get to work is VSCode and some linux VM or container. PHP has an obnoxious amount of depth. You can become an expert on just ORMs or just SSO or just Collections or just routing and still be learning something new everyday. I am actually…
> I am actually "self tought". Whatever that means. What does that mean? I know what taught means, but tought? No idea.
Re: PHP in 2022
#307Earlier quoted context omitted.
I meant Docker. The fact that I needed multiple processes (nginx+fpm) made PHP setup tricky compared with e.g. Java with embedded server.
I know what you mean; that has been a problem in the past. In case you have to again, I'd recommend looking into either Roadrunner or Swoole. That makes it possible to have your application run more or less standalone in a single container, hosted by a native application server. This boosts performance incredibly, and exposes a single HTTP port, as it should be. For Symfony: https://github.com/k911/swoole-bundle For…
Re: PHP in 2022
#308Earlier quoted context omitted.
I meant Docker. The fact that I needed multiple processes (nginx+fpm) made PHP setup tricky compared with e.g. Java with embedded server.
> The fact that I needed multiple processes (nginx+fpm) I believe you can have fpm listen on TCP and run nginx in another container if you want, although I haven't tried it so I can't vouch for it.
Re: PHP in 2022
#309Re: PHP in 2022
#310A lot of people here have mentioned Laravel. I think one of the key things about Laravel is that the creator, Taylor Otwell, is only focused on Laravel. Imagine if DHH didn't ever have Basecamp (or 37 Signals) and only focused on Rails and the Rails ecosystem. The Laravel team now has several full time employees working on making the entire Laravel experience as painless as it can be. Of course Taylor and the Laravel…