Warning: include(../lntop.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/function-exists.html on line 19

Warning: include() [function.include]: Failed opening '../lntop.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/function-exists.html on line 19

Warning: include(../levoe_menu.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/function-exists.html on line 46

Warning: include() [function.include]: Failed opening '../levoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/function-exists.html on line 46



Учебник РНР
Назад Вперёд

function_exists

(PHP 3>= 3.0.7, PHP 4)

function_exists - возвращает TRUE, если данная функция определена.

Описание

bool function_exists (string function_name)

Проверяет в списке определённых функций, встроенных (внутренних) и пользовательских, наличие функции function_name. Возвращает TRUE при успехе, FALSE - при ошибке.
if (function_exists('imap_open')) {
    echo "IMAP functions are available.<br>\n";
} else {
    echo "IMAP functions are not available.<br>\n";
}

Обратите внимание, что имя функции может существовать, даже если сама функция не может использоваться из-за опций конфигурации или компиляции (image-функции как пример). Также отметьте, что function_exists() возвращает FALSE для таких конструкций, как include_once() и echo().

См. также method_exists() и get_defined_functions().


Назад Оглавление Вперёд
func_num_args Вверхget_defined_functions


Warning: include(../pravoe_menu.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/function-exists.html on line 149

Warning: include() [function.include]: Failed opening '../pravoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/function-exists.html on line 149

Rambler's Top100
© 2009 Тест скорости интернета |  Boont.Ru

Warning: include(../lnbottom.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/function-exists.html on line 275

Warning: include() [function.include]: Failed opening '../lnbottom.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/function-exists.html on line 275