Zero filling (or zero padding) is when you pad a value on the left side to a specific length. This is something you will commonly see in database schemas for integer columns. But what if we’re not working with data that’s already zero filled by a database? All we have to do is take advantage of PHP’s type juggling and pad the variable with
Now we have a zero filled value to use as we please. Comes in handle when displaying a unique ID integer as tabular data, keeps everything nice and uniform looking.