3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function paddit ($num) { $padding = strlen($num) - 1; $firstDigit = $num[0]; return str_pad($firstDigit, $padding, '0'); } echo paddit(392);
Output for 4.3.0 - 7.2.0
00