3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '405090000'; preg_match('/^(?<year>\d{1})(?<month>\d{2})(?<day>\d{2})/', $string, $matches); var_dump($matches);

preferences:
41.51 ms | 402 KiB | 5 Q