(PECL)
注: 本函數不能用於動作現用的正在運行(或運行鏈上)的方法。
本函數是實驗性的。本函數的行為,內含函數名稱以及其它任何關於本函數的文件可能會在沒有知會的情況下隨 PHP 以後的發佈而改變。使用本函數風險自擔。
The filename of the class method definitions to import
Associative array of imported methods
例子 1. classkit_import() example
<?php// file: newclass.phpclass Example { function foo() { return "bar!\n"; }}?>
<?php// requires newclass.php (see above)class Example { function foo() { return "foo!\n"; }}$e = new Example();// output originalecho $e->foo();// import replacement methodclasskit_import('newclass.php');// output importedecho $e->foo();?>
上例將輸出:
foo! bar!