Download .zip |
Info | Documentation | View files (35) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2018-09-01 (1 month ago) | Not yet rated by the users | Total: Not yet counted | Not yet ranked |
Version | License | PHP version | Categories | |||
baseconverter 1.0 | MIT/X Consortium ... | 5 | PHP 5, Text processing, Conversion |
Description | Author | |
This package can convert number representations between two bases. |
BaseConverter is a simple and small library to convert interger values to different other bases and back.
Just run the following command in your project root:
composer require neoblack/base-converter:~1.0
<?php
require_once 'vendor/autoload.php';
use NeoBlack\BaseConverter\BaseConverter;
$number = 100;
$base64Number = BaseConverter::toBase($number, BaseConverter::BASE64); // Result: 1A
$base62Number = BaseConverter::toBase($number, BaseConverter::BASE62); // Result: 1C
$base32Number = BaseConverter::toBase($number, BaseConverter::BASE32); // Result: 34
$base16Number = BaseConverter::toBase($number, BaseConverter::BASE16); // Result: 64
BaseConverter::to10Base($base64Number, BaseConverter::BASE64); // Result: 100
BaseConverter::to10Base($base62Number, BaseConverter::BASE62); // Result: 100
BaseConverter::to10Base($base32Number, BaseConverter::BASE32); // Result: 100
BaseConverter::to10Base($base16Number, BaseConverter::BASE16); // Result: 100
If you want to contribute, fork this repository and send a pull request.
./bin/phpunit -c Build/UnitTests.xml
rm -rf docs
./bin/phpunit -c Build/UnitTests.xml --coverage-html docs
The MIT License (MIT) see license file.
Files |
File | Role | Description | ||
---|---|---|---|---|
.github (2 files) | ||||
Build (2 files) | ||||
docs (3 files, 5 directories) | ||||
src (2 directories) | ||||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files | / | .github |
File | Role | Description |
---|---|---|
ISSUE_TEMPLATE.md | Data | Auxiliary data |
PULL_REQUEST_TEMPLATE.md | Data | Auxiliary data |
Files | / | Build |
File | Role | Description |
---|---|---|
UnitTests.xml | Data | Auxiliary data |
UnitTestsBootstrap.php | Class | Class source |
Files | / | docs |
File | Role | Description | ||
---|---|---|---|---|
Classes (3 files) | ||||
css (3 files) | ||||
fonts (1 file) | ||||
js (7 files) | ||||
Tests (2 files, 1 directory) | ||||
BaseConverter.php.html | Doc. | Documentation | ||
dashboard.html | Doc. | Documentation | ||
index.html | Doc. | Documentation |
Files | / | docs | / | Classes |
File | Role | Description |
---|---|---|
BaseConverter.php.html | Doc. | Documentation |
dashboard.html | Doc. | Documentation |
index.html | Doc. | Documentation |
Files | / | docs | / | css |
File | Role | Description |
---|---|---|
bootstrap.min.css | Data | Auxiliary data |
nv.d3.min.css | Data | Auxiliary data |
style.css | Data | Auxiliary data |
Files | / | docs | / | js |
File | Role | Description |
---|---|---|
bootstrap.min.js | Data | Auxiliary data |
d3.min.js | Data | Auxiliary data |
holder.min.js | Data | Auxiliary data |
html5shiv.min.js | Data | Auxiliary data |
jquery.min.js | Data | Auxiliary data |
nv.d3.min.js | Data | Auxiliary data |
respond.min.js | Data | Auxiliary data |
Files | / | docs | / | Tests |
File | Role | Description | ||
---|---|---|---|---|
Unit (4 files) | ||||
dashboard.html | Doc. | Documentation | ||
index.html | Doc. | Documentation |
Files | / | docs | / | Tests | / | Unit |
File | Role | Description |
---|---|---|
BaseConverterTest.php.html | Doc. | Documentation |
BaseTestCase.php.html | Doc. | Documentation |
dashboard.html | Doc. | Documentation |
index.html | Doc. | Documentation |
Files | / | src | / | Tests | / | Unit |
File | Role | Description |
---|---|---|
BaseConverterTest.php | Class | Class source |
BaseTestCase.php | Class | Class source |
Version Control | Unique User Downloads | |||||||
100% |
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.