Earlier quoted context omitted.
Don't forget Laravel for PHP.
To get to know Laravel, I forced myself to build a project with it for a few weeks and I did not like it. I found myself getting sucked in into a complex project structure and dealing with all kinds of strangeness like "artisan commands", "the autoload cache" etc. With Django, I can build a web application in a single file that has "import django" on top and take it from there: https://news.ycombinator.com/item?id=40…
PHP 8.4
111–120 of 337 posts
Re: PHP 8.4
#112variable-length lookbehind assertions are now supported.
yay! I needed that so many times.
Re: PHP 8.4
#113Earlier quoted context omitted.
> Python’s packaging and dependencies system is lacking It is? I never had problems with poetry. Though I agree that there are mroe options than necessary.
That's a wild perspective. Python has the worst packaging ecosystem i've ever seen
Re: PHP 8.4
#114Earlier quoted context omitted.
There are of course ways to get "reload page, see results" to work even with Python. After all, computers are touring complete. But in PHP you have it out of the box. Faster, with less complexity and less resource consumption. And you can use the same setup in development as you can use in production.
Maybe I'm missing something, but PHP is not more efficient in that regard. When you load a Python page, it is served by an in-memory process. If code is updated, the process is restarted, parsing the code and initialising the application, but it is done only once. When you load a PHP page, it parses the code and initializes the app for each request . It then tears everything down after the request. There are less was…
Initializes for each request is standard with php-fpm, but swoole/workerman/etc are rapidly gaining popularity and run as a more typical app server with coroutines.
Re: PHP 8.4
#115I have a question to the PHP-in-production crowd: how long do you wait before migrating to higher version of PHP? Is the first release usually already fine, or is it better to wait for a few months and let someone else catch the early errors?
Re: PHP 8.4
#116Are there any solid PHP WebSockets and WebRTC setups outside of Laravel?
Re: PHP 8.4
#117Earlier quoted context omitted.
> Easy to deploy: Upload files, done I know people love to say this, but does anyone realistically make websites or web apps that way? No, not really. Even with PHP there are frameworks, there is a package manager, there is version control, and there are deployment systems. Pretending that PHP developers are uploading a .php file to a shared hosting server (like in 2002) to suit the narrative feels disingenuous to me…
>but does anyone realistically make websites or web apps that way? You are correct in that a lot of PHP use now is larger frameworks with asset compilation and cache clearing etc, but even when developing on large systems like that it is nice to sometimes be able to just manually tweak a file and refresh. For R&D and quick tests, just uploading a quick & dirty php file to the server is a very useful language feature…
Right, but unless you have an ftp server or quick ssh access and PHP isn’t doing any code caching that feature isn’t an advantage, how many developers are in that situation? Is this something you do?
If you’re running locally PHP spawns its own server which other runtimes have. If you’re running this on a server you’re most likely going to have app/code caching (apc Or opcache) switched on so you’ll need to restart the server anyway, in which case it’s not more advantageous than uploading a js file and restarting node.
Re: PHP 8.4
#118Earlier quoted context omitted.
> With predictable results. People building and creating awesome new things? Increase in happiness and empowerment? More efficient processes and increase in productivity? New businesses being born? Wealth and value being added to society?
> More efficient processes and increase in productivity I'd have to see the numbers on those ones. But I am not a "gatekeeper" type, maybe you are confusing me for one. I'm a high school dropout with a GED, and have been staring up people's noses, all my life. I just believe that any job we do, should be a good job. Build on a sand foundation, and you'd better not go too high, or Bad Things Happen.
Re: PHP 8.4
#119I'm just a PHP programmer for work, but I worry about the orientation PHP has chosen. As French people say: better is the enemy of good (Le mieux est l'ennemi du bien). The two new language features bring a higher language complexity for dubious gains. I hope I won't have to work with these. Property hooks mean that some language magic will turn a property access into a call to methods. It implies that `$this->x` has…
I feel the opposite: this brings simplicity and pragmatism back to PHP. Gone are the years of bowing to the verbosity of Java, sacrificing a dynamic powerful language at the altar of 1995's OOP paradigms.
Re: PHP 8.4
#120Are there any solid PHP WebSockets and WebRTC setups outside of Laravel?
webRTC is a beast with the STUN server needs better handled elsewhere.