PHP code example of elecena / ic-package-info
1. Go to this page and download the library: Download elecena/ic-package-info 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/ */
elecena / ic-package-info example snippets
use Elecena\Utils\PackageInfo;
$package = PackageInfo::getPackage('2N7000 N CHANNEL MOSFET, 60V, 200mA, TO-92'); // this will return 'TO-92'
// additionally, PackageInfo normalizes the packages
$package = PackageInfo::getPackage('MOSFET,N CHANNEL,600V,3.7A,SC-67'); // will return 'TO-220F'
// false will be returned when a valid package is not found
$package = PackageInfo::getPackage('foo bar-42'); // will return false