previous高度な使用法 (Previous) (Next) PHP_Compat::loadConstantnext

View this page in Last updated: Sun, 21 Jun 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

PHP_Compat::loadFunction

PHP_Compat::loadFunction() – 関数をロードする

Synopsis

require_once 'PHP/Compat.php';

mixed PHP_Compat::loadFunction ( mixed $function )

Description

関数をロードします。

Parameter

mixed $function

ロードしたい関数の名前、もしくは関数の配列

Return value

mixed

  • 関数がロードされた場合は、TRUE を返します。
  • 定義済みであるか定義ファイルをロードできず、関数がロードされない場合、 FALSE を返します。
  • ロードする関数の配列を渡した場合は、TRUE/FALSE の配列が返されます。

Example

クラスを使って関数をロードする

<?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';
?>

Note

This function should be called statically.

previous高度な使用法 (Previous) (Next) PHP_Compat::loadConstantnext

Download Documentation Last updated: Sun, 21 Jun 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.