1.

How many times can you define _________ autoload in a process?(a) once(b) twice(c) thrice(d) as many times as neededThe question was posed to me in an online interview.I'd like to ask this question from Object Tools in portion Object Tools and Design and Variables in PHP of PHP

Answer»

The correct option is (a) once

Easiest EXPLANATION: __autoload is a powerful tool, but it does have some limitations. In particular, you can only define it once in a process. If you NEED to change your AUTOLOAD function DYNAMICALLY you should look at the spl_autoload_register function, which supports that FUNCTIONALITY.



Discussion

No Comment Found

Related InterviewSolutions