Codice PHP:
if(is_numeric($var)){
print 
"è un numero";
}

if(
strpos($var,'#') === false){
print 
"non c'è #";