Answers for "function exists"

PHP
0

function_exists

<?php
if (function_exists('imap_open')) {
    echo "IMAP functions are available.<br />\n";
} else {
    echo "IMAP functions are not available.<br />\n";
}
?>
Posted by: Guest on April-15-2021
2

js check if function exists

if (typeof yourFunctionName == 'function') { 
  yourFunctionName(); 
}
Posted by: Guest on March-28-2020
1

function exists

function_exists('function_name'); //Will return true if function exists
Posted by: Guest on August-10-2020

Browse Popular Code Answers by Language