Home
Viewing all posts tagged with math

Creating a custom numeric base in PHP

February 01, 2020
php math
Recently I wanted to create URL's that used words instead of integers for specific posts, however, these URL's needed to conform to three points. Be completely unique. Be repeatable with the same seed. Be reversible back to their seed. The idea of a numeric base (or "radix") is pretty simple, you have x number of digits to work with (in the most common base, base-10, you have 10 digits to work with: 0-9.) When y ...