webmasters/base-converter

Base converter for integers to base 36 and back (with optional shifting)

1.1.0 2017-12-01 16:49 UTC

This package is auto-updated.

Last update: 2024-12-09 00:28:42 UTC


README

Webmasters Base Converter 10 <-> 36

Just another base converter for integers to base 36 and back (with an optional shifting)

Examples

<?php

use \Webmasters\Utilities\Numbers\BaseConverter;

BaseConverter::setShifting(999);

$base10 = 1;
$base36 = BaseConverter::toBase36($base10); // 'rs'

$base36 = 'rs';
$base36 = BaseConverter::toBase10($base36); // 1

Idea

Jan Teriete