PHP code example of frdl / oid2weid

1. Go to this page and download the library: Download frdl/oid2weid 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/ */

    

frdl / oid2weid example snippets


$oid = '1.3.6.1.4.1.37553.8.9';
$weid = \WeidOidConverter::oid2weid($oid); // weid:9-1
$oid2 = \WeidOidConverter::weid2oid($weid);
print_r(($oid ===$oid2) ? 'OK' : 'ERROR');