spl_autoload_unregister

Unregisters an autoloader function.

Description

spl_autoload_unregister( (callable) $function ); 

Parameters (1)

0. $function (callable)
The function to unregister.

Usage

  1. if ( !function_exists( 'spl_autoload_unregister' ) ) { 
  2. require_once ABSPATH . WPINC . '/compat.php'; 
  3.  
  4. // The function to unregister. 
  5. $function = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = spl_autoload_unregister($function); 
  9.  

Defined (1)

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

/wp-includes/compat.php  
  1. function spl_autoload_unregister( $function ) { 
  2. global $_wp_spl_autoloaders; 
  3. foreach ( $_wp_spl_autoloaders as &$autoloader ) { 
  4. if ( $autoloader === $function ) { 
  5. unset( $autoloader ); 
  6. return true; 
  7.  
  8. return false;