<?php
if (preg_match('/(\d{2})(\d{2})(\d{4})/', '11092018', $matches)) { echo "{$matches[1]}-{$matches[2]}-{$matches[3]}";
}
PD9waHAKCmlmIChwcmVnX21hdGNoKCcvKFxkezJ9KShcZHsyfSkoXGR7NH0pLycsICcxMTA5MjAxOCcsICRtYXRjaGVzKSkgewogICAgZWNobyAieyRtYXRjaGVzWzFdfS17JG1hdGNoZXNbMl19LXskbWF0Y2hlc1szXX0iOwp9