3 ms·
This is, indeed, my favorite feature of the language.
by ksenzee 1y ago
This is, indeed, my favorite feature of the language.
- nine_k 1y agoIt's not a language feature but a runtime feature. There's no reason why JS or Python or Java could not be run like that.
- ksenzee 1y agoThe language itself, though, does absolutely have this assumption built in. If you want to run it in an endless loop, you’ll have issues.
- EGreg 1y agoNo you won’t, other runtimes like Swoole, FrankenPHP, and even amphp let you do that, just spin up a PHP process. I wouldn’t recommend them, though.
- ksenzee 1y ago“You’ll have issues” was my way of saying “I wouldn’t recommend them.” IMO if you want to run in a loop, pick a language where that’s the standard practice.
- dingdingdang 1y agoI find some of the language around FrankenPHP difficult to parse - is FrankenPHP always in loop mode (ala ReactPHP) or is it simply an option? I can't tell.. my gut reaction upon reading the intro material is that they "simply" replaced Apache/Nginx with Go's inbuilt, and much lighter, server structure and that PHP itself is left to run completely isolated as per usual?! edit: indeed https://frankenphp.dev/docs/classic/ https://frankenphp.dev/docs/classic/ indicates normal runner capability similar to Apache.