A WordPress-centric search engine for devs and theme authors



spl_autoload_unregister ›

Since4.6.0
Deprecatedn/a
spl_autoload_unregister ( $function )
Parameters:
  • (callable) $function The function to unregister.
    Required: Yes
Returns:
  • (bool) True if the function was unregistered, false if it could not be.
Defined at:
Codex:

Unregisters an autoloader function.



Source

function spl_autoload_unregister( $function ) {
		global $_wp_spl_autoloaders;
		foreach ( $_wp_spl_autoloaders as &$autoloader ) {
			if ( $autoloader === $function ) {
				unset( $autoloader );
				return true;
			}
		}

		return false;
	}