3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $msg = "1a12v21s1fs4d4"; $txt = "/(1[a-z]+1)|(4[a-z]4)/"; $res = preg_replace($txt,"$1 $2",$msg); echo $res;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1a1 2v21s1 fs 4d4