Codice PHP:
if(typeof myfunction === 'function'){
   
//function exists