IBAN::HumanFormat PHP Method

HumanFormat() public method

public HumanFormat ( )
    public function HumanFormat()
    {
        return iban_to_human_format($this->iban);
    }

Usage Example

Ejemplo n.º 1
0
 # instantiate
 $myCountry = new IBANCountry($countrycode);
 # start section
 print "[{$countrycode}: " . $myCountry->Name() . "]\n";
 # output remaining country properties
 print "Is a SEPA member? ";
 if ($myCountry->IsSEPA()) {
     print "Yes";
 } else {
     print "No";
 }
 print ".\n";
 # get example iban
 $myIban = new IBAN($myCountry->IBANExample());
 # output example iban properties one by one
 print "Example IBAN: " . $myIban->HumanFormat() . "\n";
 print " - country  " . $myIban->Country() . "\n";
 print " - checksum " . $myIban->Checksum() . "\n";
 print " - bban     " . $myIban->BBAN() . "\n";
 print " - bank     " . $myIban->Bank() . "\n";
 print " - branch   " . $myIban->Branch() . "\n";
 print " - account  " . $myIban->Account() . "\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 {
     print "ERROR: IBAN {$myIban->iban} is invalid.\n";