3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo preg_replace_callback('/\d+/', function($match){ $match[0] = intval($match[0]); if ($match[0]<100) { return sprintf("%'.03d", $match[0]); } else { return $match[1]; } }, 'H_000100');

preferences:
51.16 ms | 402 KiB | 5 Q