3v4l.org

run code in 300+ PHP versions simultaneously
<?php // transforms a U.S. date (MM/DD/YYYY) into a French date (DD/MM/YY) $a1 = '04/23/0288'; // for test $a2 = preg_replace("/([\d]+)\/([\d]+)\/[\d]{1}([\d]){2}/", "$2/$1/$3", $a1); echo $a2; // must be '23/04/15'
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
23/04/88

preferences:
127.88 ms | 408 KiB | 5 Q