Jorge Castro
Oct 4, 2021

You are never ever see the code of Laravel, are you?

LETS ME TEACH YOU:

PHP is interpreted and it is evaluated for each request. OpCache keeps pre-compiled version of the code so it helps a lot. However, PHP doesn't have the concept of Application. So, the code is still evaluated by each request, every time, all the time.

For example, Composer's autoload feature. It is neat but it could creates a huge array (specially if the system is huge). So, it means a lot of resources wasted and it is only for a tiny functionality. And those resources are wasted per request.

What JAVA does instead? Java has an application that it is executed once and it keeps all the functionalities and code in memory. Java does it once and Java could do that since the first version of JAVA EE (1990).

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Responses (6)

Write a response