Meglio ancora...

codice:
function stampa_nome(){
     if (defined('NOME')) {
         echo NOME;
     }
}