3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $name = "IPC_IPCamera_13_7_24_9_57_45.jpg"; $parts = explode("_", $name); for ($i = 0; $i < count($parts); $i++) { $part = $parts[$i]; if (count($part) == 1) { $part = "0" . $part; } $name .= $part . "_"; } echo $name;
Output for 4.3.0 - 7.1.0
IPC_IPCamera_13_7_24_9_57_45.jpg0IPC_0IPCamera_013_07_024_09_057_045.jpg_