Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Multibyte String Pad
*
* Functionally, the equivalent of the standard str_pad function, but is capable of successfully padding multibyte strings.
*
* @param string $input The string to be padded.
* @param int $pad_length The length of the resultant padded string.
* @param string $pad_string The string to use as padding. Defaults to space.