I was developing a PHP project recently using Laravel Framework. I was wondering whether the unused functions/methods of PHP get loaded into memory?. I read that one of pros of interpreted languages that they have automatic memory management. However, this has not answered my question of whether they are loaded or not. Does this automatic memory management handle the case mentioned?
What actually happens to my memory when I run:
php artisan serve
Is my whole Laravel project being loaded into memory?
If yes, Is it my responsibility as a developer to handle loading commonly used functions/methods?, furthermore; how do I decide where to store it or on which principles? (Note: You do not have to explain it all to me, just redirect me to a manual)
If no, where does it stores its methods or functions(i.e. cache, swaps to hard disk)?Moreover, are they stored as plain code or they have been interpreted already for further use?