3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = " ala KOM1/9/2000 7/7/2015 1-7-2001 7.7.2001 "; echo preg_replace("/(\d+)-(\d+)-(\d+)/", "$2/$3/$1", "2007-01-25"); echo preg_replace( "/\d{2}/", "XX", $s); ?>
based on 0FJW2
Output for 4.3.0 - 7.1.0
01/25/2007 ala KOM1/9/XXXX 7/7/XXXX 1-7-XXXX 7.7.XXXX