spl_autoload_unregister

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

spl_autoload_unregister注銷已注冊的 __autoload() 函數(shù)

說明

spl_autoload_unregister(mixed $autoload_function): bool

從 autoload 自動裝載函數(shù)隊列中移除指定的函數(shù)。如果該函數(shù)隊列處于激活狀態(tài),并且在給定函數(shù)注銷后該隊列變?yōu)榭眨瑒t該函數(shù)隊列將會變?yōu)闊o效。

如果該函數(shù)注銷后使得自動裝載函數(shù)隊列無效,即使存在有 __autoload 函數(shù)它也不會自動激活。

參數(shù)

autoload_function

要注銷的自動裝載函數(shù)。

返回值

成功時返回 true, 或者在失敗時返回 false。