3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (array('19.03.2014','30.02.1980','1.1.1970','1781980', '04071792') as $value) { print("$value\n"); if (1 === preg_match('/^([0-3]?[0-9])\\.?([01]?[0-9])\\.?((19|20)[0-9][0-9])$/', trim($value), $matches)) { var_dump($matches); } else { print("No match\n"); } }

preferences:
35.13 ms | 402 KiB | 5 Q