Lazy initialization is a technique where a class is automatically loaded by the Phalcon class ‘Loader’ during runtime. This greatly improves performance. Auto loader does this in 4 ways i.e. by registering

  • namespaces, $loader->registerNamespaces(…)
  • directories, $loader->registerDirs(…)
  • classes, $loader->registerClasses(…)
  • files $loader->registerFiles(…)

and then registering the auto loader as $loader->register();

BY Best Interview Question ON 03 Apr 2019

Suggest An Answer