|
|
|
|
|
by cagataygurturk
3483 days ago
|
|
All those opcodes etc. are the "hacks" to accelerate php bootstrapping. For example in java there are already threads waiting for the request and when a request comes, the path of the request until the controller is much less. There are cache connection, db connection, everything is ready waiting for the request. In PHP for every request the same story is repeating and repeating. If you have a index.php, serving directly your logic, there is no problem, php is designed for those use cases. But if you are using a modern PHP framework that mimics Other platforms (I believe most of them are inspired by JAVA), you are having a big overhead because PHP is not designed to behave like this. Another question, with those modern PHP frameworks you are already learning and applying almost every concept that you can use with (let's say) JAVA. Then why not to use that powerful platform which inspires PHP? It is like you have driving licence for a truck and you can drive a truck almost perfectly after 3 months of practice, but still you prefer your old minivan to carry 10 tons of load. The minivan was not designed for 10 tons of load but there are some modifications allowing that, but if you spend 30% more fuel. Don't come with the argument of "php is easy". It is as hard as other similar languages. |
|
Large PHP frameworks I think is starting to reach end of line. Seems like a micro framework trend has started with Zend Expressive and similar middleware based frameworks.
There was a trend of making PHP into Java, I think that is the wrong path, as you say, Java already exists. That trend also existed in JavaScript a long time ago. Seems like a natural instinct by some developers to do so when trying to create structure from a chaos like world.
Much better to build on PHP strengths. Dynamic, stateless, fast development cycle.