codice:
if ( preg_match('#^[-\da-z./]+$#i', $line) AND strlen(preg_replace('#[^\d]#', '', $line)) >= 3 ) {
    echo "$line ok\n";
}