<?php
function mb_str_pad( $input, $pad_length, $pad_string = ' ', $pad_type = STR_PAD_RIGHT, $encoding="UTF-8") {
return str_pad( $input, $pad_length + $diff, $pad_string, $pad_type ); }
echo mb_str_pad("ddã", 10, "0", STR_PAD_LEFT) . "\n";
echo str_pad("ddã", 10, "0", STR_PAD_LEFT
);
PD9waHAKCmZ1bmN0aW9uIG1iX3N0cl9wYWQoICRpbnB1dCwgJHBhZF9sZW5ndGgsICRwYWRfc3RyaW5nID0gJyAnLCAkcGFkX3R5cGUgPSBTVFJfUEFEX1JJR0hULCAkZW5jb2Rpbmc9IlVURi04IikgewogICAgJGRpZmYgPSBzdHJsZW4oICRpbnB1dCApIC0gbWJfc3RybGVuKCRpbnB1dCwgJGVuY29kaW5nKTsKICAgIHJldHVybiBzdHJfcGFkKCAkaW5wdXQsICRwYWRfbGVuZ3RoICsgJGRpZmYsICRwYWRfc3RyaW5nLCAkcGFkX3R5cGUgKTsKfQoKZWNobyBtYl9zdHJfcGFkKCJkZMOjIiwgMTAsICIwIiwgU1RSX1BBRF9MRUZUKSAuICJcbiI7CmVjaG8gc3RyX3BhZCgiZGTDoyIsIDEwLCAiMCIsIFNUUl9QQURfTEVGVCk7Cg==