function exists
snippet in php

js check if function exists

user5027

if (typeof yourFunctionName == 'function') { 
  yourFunctionName(); 
}

function exists

user6256

function_exists('function_name'); //Will return true if function exists