3 ms·
> PHP is so much nicer to use on a webserver vs Python or JS. How?
by wiseowise 2y ago
> PHP is so much nicer to use on a webserver vs Python or JS.
How?
- diggan 2y agoOne thing that I think is under-appreciated from the perspective of "getting shit done" is that the default model of PHP makes it really hard to have memory leaks that eventually crashes your app/server, as your PHP script has a defined "start" and "end" that are all within the request lifecycle. So even if you leak horribly, thanks to Apache/Nginx/Caddy/whatever only launching your script and then your script stops running, it basically doesn't affect you at all. Granted, this is more like a bandage, but it works out great for beginners who just want to create their own personal dynamic homepages, something PHP does great :) Compared to Python or JS where the standard practice is creating a server that runs constantly, and if you leak memory somewhere, your application eventually crashes as you run out of memory.
- cwillu 2y agoBasically, PHP was using arenas before arenas were cool :)
- archerx 2y agoA lot of the vanilla inbuilt functions are very web oriented and if you like C, it feels very similar but much easier.