Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 16777 программистов и 1759 роботов. Сейчас ищут 1893 программиста ...

PHP_Compat::loadFunction

Вернуться к: PHP_Compat

PHP_Compat::loadFunction

PHP_Compat::loadFunction() – Load a function, or an array of functions

Synopsis

require_once 'PHP/Compat.php';

mixed PHP_Compat::loadFunction ( mixed $function )

Loads a function, or an array of functions.

Parameter

mixed $function

The name, or an array of names, of functions to load

Return value

mixed

  • TRUE if the function was loaded.
  • FALSE if the function was not loaded. Either unable to be included or already defined.
  • If you specified an array of functions to load, an array of TRUE/FALSE values is returned.

Example

Loading a function with the class:

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

You may also load a function without using the class.

Loading a function manually:

<?php
require_once 'PHP/Compat/Function/file_put_contents.php';
?>

Note

This function should be called statically.



Вернуться к: PHP_Compat

© 2025 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware