What does spl_autoload_register () mean by the third parameter?

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.