__autoload

Autoloader compatibility callback.

Description

__autoload( (string) $classname ); 

Parameters (1)

0. $classname (string)
Class to attempt autoloading.

Usage

  1. if ( !function_exists( '__autoload' ) ) { 
  2. require_once ABSPATH . WPINC . '/compat.php'; 
  3.  
  4. // Class to attempt autoloading. 
  5. $classname = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = __autoload($classname); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/compat.php  
  1. function __autoload( $classname ) { 
  2. global $_wp_spl_autoloaders; 
  3. foreach ( $_wp_spl_autoloaders as $autoloader ) { 
  4. if ( ! is_callable( $autoloader ) ) { 
  5. // Avoid the extra warning if the autoloader isn't callable. 
  6. continue; 
  7.  
  8. call_user_func( $autoloader, $classname ); 
  9.  
  10. // If it has been autoloaded, stop processing. 
  11. if ( class_exists( $classname, false ) ) { 
  12. return;