spl_autoload_unregister( callable $function )

Unregisters an autoloader function.


Description Description


Parameters Parameters

$function

(callable) (Required) The function to unregister.


Top ↑

Return Return

(bool) True if the function was unregistered, false if it could not be.


Top ↑

Source Source

File: wp-includes/spl-autoload-compat.php

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

		return false;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.