if ($supposed_checksum != '') { if ($supposed_checksum != $nationalchecksum) { print " (INVALID! Should be '" . $supposed_checksum . "'!)\n"; exit(1); } else { print " (National checksum manually validated.)\n"; } # also check 'verify' codepath if (!$myIban->VerifyNationalChecksum()) { print " (ERROR: VerifyNationalChecksum({$iban}) did not validate!)\n"; exit(1); } else { print " (National checksum automatically validated.)\n"; } # also check 'set' codepath $myIban->SetNationalChecksum(); if ($myCountry->IBANExample() != $myIban->iban) { print " (ERROR: iban_set_nationalchecksum('" . $myCountry->IBANExample() . "') returned '" . $myIban->iban . "')\n"; exit(1); } else { print " (Correction of national checksum functionality validated.)\n"; } } # output all properties #$parts = $myIban->Parts(); #print_r($parts); # verify print "\nChecking validity... "; if ($myIban->Verify()) { print "IBAN {$myIban->iban} is valid.\n"; } else {