Answer the question
In order to leave comments, you need to log in
Composer autoload how does it work?
Interested in the question does the composer load the libraries all at once or as they are actually used? I would like to save resources) there are some that I use very rarely in special. cases)
Answer the question
In order to leave comments, you need to log in
it loads only what is required in the code
, there the loader is added via php.net/manual/ru/function.spl-autoload-register.php
Oh :)
Composer simply downloads libraries to your project and writes them to autoload.
Autoload doesn't work like "load everything into me right now, hurry up!!!". It only works when referring to a class that is not in the current file.
Exactly as prescribed by smple , but with one caveat: composer must also be included in the project, and this is already through require_once('vendor/autoload.php')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question