3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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');
based on Ij9BN
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0beta1
Notice: Undefined offset: 1 in /in/JEMVV on line 8 H_
Output for hhvm-3.15.4
Notice: Undefined index: 1 in /in/JEMVV on line 8 H_