3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($y = 1999; $y<=2100; $y++) { for($m=1; $m<=12; $m++) { echo $y.'-'.sprintf('%02d ', $m), (int) preg_match('/20[0-9]{2}-(0[1-9]|1[0-2])/', $y.'-'.sprintf('%02d', $m)), PHP_EOL; } }

preferences:
54.52 ms | 402 KiB | 5 Q