📜  在 php 代码示例上填充零

📅  最后修改于: 2022-03-11 14:54:46.003000             🧑  作者: Mango

代码示例1
$number = 12;
$width = 4;
$padded = str_pad((string)$number, $width, "0", STR_PAD_LEFT);