4 ms·
Been using it so far using a PPA with my own unreleased Python dialect that compiles to PHP. Gonna be a solid release. Amazing to see so much evolution for PHP
by geenat 4y ago
Been using it so far using a PPA with my own unreleased Python dialect that compiles to PHP. Gonna be a solid release.
Amazing to see so much evolution for PHP- autoloading and automatic file-based routing are such killer features for rapid development.
Fibers are going to be a gamechanger for performance once libraries start adopting it.
- datalopers 4y agoFibers were released in 8.1 but are there improvements in 8.2? I'm curious to see how useful it is until a lot of core libraries (curl, redis, mysqlnd, etc) can be called non-blocking and/or trigger a fiber yield during a block? My understanding is swoole does a whole lot of work to enable hooking into those to allow coroutines, which won't implicitly exist with fibers?
- geenat 4y agoIMO, unless I am mistaken, using a continually running PHP process like Swoole removes advantages you get with vanilla PHP: fully isolated requests, file based routing, etc. This is why fibers are so big. It'll bring performance without the downsides.
- vedranm 4y agoCoroutines have been available via many packages for a while; (Open)Swoole and Amp come to mind, but there are probably others. Laravel has supported using (Open)Swoole via Octane for over a year. Why would having coroutines as fibers in the core be a gamechanger?
- geenat 4y agoSee: https://news.ycombinator.com/item?id=32726419 https://news.ycombinator.com/item?id=32726419 Performance without downsides.
- capableweb 4y ago> Why would having coroutines as fibers in the core be a gamechanger? Plenty of technical reasons but for me, the biggest is unity among libraries/technologies. There been versions of coroutines/fibers around PHP for many years, first time I heard about it was a PHP fork that implemented fibers, don't recall the name but must have been something like 10 years ago... But the problem has always been that you cannot rely on the community having things like that available. Having it in the core language, means that more libraries can depend on it, and users are therefore incentives to learn more about it, as they can rely on it sticking around. Overall, I'm happy it's coming into the core language.
- rob-olmos 4y ago> first time I heard about it was a PHP fork that implemented fibers, don't recall the name Probably thinking of HHVM/Hack: https://docs.hhvm.com/hack/asynchronous-operations/introduction https://docs.hhvm.com/hack/asynchronous-operations/introduct...
- vedranm 4y ago> Having it in the core language, means that more libraries can depend on it, and users are therefore incentives to learn more about it, as they can rely on it sticking around. Symfony 6.1 and the upcoming Laravel 10 require PHP 8.1+, but I don't see them using fibers yet. We'll have to wait and see.
- nerdponx 4y agoWhat's the benefit of compiling a Python-like language to PHP instead of just using PHP?
- lowercased 4y agoExisting familiarity with a python-like language? Lack of motivation to learn the intricacies of PHP? (valid reasons and I'm not trying to sound sarcastic here).
- ksec 4y agoAvoiding PHP syntax alone is a big plus to me.
- progre 4y agoIt's the $varname syntax right? I get angry about it too.