mixed PHP_Compat::loadFunction (
mixed $function
)
関数をロードします。
$function
ロードしたい関数の名前、もしくは関数の配列
mixed
クラスを使って関数をロードする
<?php
require_once 'PHP/Compat.php';
// load file_put_contents
PHP_Compat::loadFunction('file_put_contents');
// load str_split, array_chunk and file_get_contents
PHP_Compat::loadFunction(array('str_split', 'array_chunk', 'file_get_contents'));
?>
クラスを使わずに関数をロードすることもできます。
手動で関数をロードする
<?php
require_once 'PHP/Compat/Function/file_put_contents.php';
?>
This function should be called statically.