What does spl_autoload_register () mean by the third parameter? Spl_autoload_register ()
If the third parameter is true, a function is added to the first of the queue, rather than the end of the queue.
What exactly does this passage mean? And the specific purpose. please answer your question. thank you.
Reply to discussion (solution)
The function of the spl_autoload_register function is to register a function that automatically loads classes.
Spl_autoload_register can be executed multiple times. The registered function is executed one by one in a queue until it is loaded or eventually fails.
The third parameter of spl_autoload_register determines the position of the registered function in the queue and the execution order.
This means that you can control the last registered function to be executed first, so that you have the opportunity to replace the old module with the new module.
Control the registration order so that the subsequent ones can overwrite the previous ones.