3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (preg_match('/-([0-9]+)$/', "asd-1132", $matches) === 1) { $num = (int) $matches[1]; print preg_replace('/-([0-9]+)$/', "-$1"."asd", "asd-1132"); }
based on 6UiGL
Output for 4.3.0 - 7.1.0
asd-1132asd