PHP code example of phdevutils / banks

1. Go to this page and download the library: Download phdevutils/banks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phdevutils / banks example snippets


use PhDevUtils\Banks\Banks;

Banks::findBank('BDO');            // ['name' => 'BDO Unibank, Inc.', 'shortName' => 'BDO', 'swift' => 'BNORPHMM', ...]
Banks::findBank('metrobank')['swift'];        // 'MBTCPHMM'
Banks::findBySwift('UBPHPHMMXXX')['shortName']; // 'UnionBank' (11-char input → 8-char head-office BIC)

Banks::listBanks(['type' => 'ewallet']);       // GCash, Maya, GrabPay, ShopeePay, ...
Banks::listBanks(['instapay' => true]);        // InstaPay participants
Banks::listBanks(['type' => 'universal_commercial', 'foreign' => false]); // domestic U/KBs

Banks::validateBIC('BNORPHMM');    // true
Banks::validateBIC('CITIPHMXV');   // false (9 chars — malformed)
Banks::parseBIC('BOPIPHMM');       // ['institution' => 'BOPI', 'country' => 'PH', 'location' => 'MM', 'branch' => null]