Il terzo:

Codice PHP:

function ValidIban($value) {
    
$iban false;
    
$valuestrtoupper(trim($value));
    if(
preg_match('/^IT\d{7}0[A-Z0-9]{16}$/'$value)) {
        
$numbersubstr($value,4,22).'2927'.substr($value,2,2);
        
$numberstr_replace(
            array(
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'),
            array(
10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35),
            
$number
        
);
 
        
$iban = (== bcmod($number,97)) ? true:false;
    }

return 
$iban;
}

$var ValidIban("IT...");

var_dump($var);

exit; 
Premetto anche che gil IBAN che ho provato sono sicuramente corretti.