4 ms·
It is near impossible to write "Modern" PHP and achieve good performance. On every request, PHP reads and parses every file that is referenced somehow. It is i
by nercury 10y ago
It is near impossible to write "Modern" PHP and achieve good performance.
On every request, PHP reads and parses every file that is referenced somehow. It is in direct contradiction to the language constructs the PHP itself provides - especially Exceptions, Interfaces and Inheritance.
People want to use these features, because they help design better systems, where the concerns are separated, and features are plugins instead of hardcoded all over the place.
Unfortunately, the required files for a request can pile up quite quickly, to the point where bytecode cache does not help, serving multiple requests per PHP load does not help, prewarming cache for frontend such as Varnish does not help, memory usage is over the roof because of trashed heap memory.
So, to sum up, the author here is right: this is insanity, until PHP provides a module system that can handle PHP abstractions.
- CiPHPerCoder 10y ago> So, to sum up, the author here is right: this is insanity, until PHP provides a module system that can handle PHP abstractions. I suspect you're being downvoted because we have this: https://getcomposer.org https://getcomposer.org + https://secure.php.net/manual/en/language.oop5.abstract.php https://secure.php.net/manual/en/language.oop5.abstract.php
- nercury 10y agoI worked with PHP for 5 years and I am well aware of the composer; I am being downvoted because I said that author is right on some point.
- spdionis 10y agoAnd yet PHP mostly outperforms both ruby and python. You probably haven't even used opcache.