In PHP, how do I check if a function exists?

Using function_exists:

if(function_exists('my_function')){
    // my_function is defined
}

Leave a Comment