3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str1 = "AWK-JES-0009"; $parts = explode("AWK-JES-",$str1); echo sprintf($parts[0] . '-%04d', $parts[1]+1);
based on JCfdR
Output for 4.3.0 - 7.1.10
-0010