<?php
$data = DateTime::createFromFormat('dmY', '11092018');
$formatada = $data->format('d-m-Y');
PD9waHAKCiRkYXRhID0gRGF0ZVRpbWU6OmNyZWF0ZUZyb21Gb3JtYXQoJ2RtWScsICcxMTA5MjAxOCcpOwoKJGZvcm1hdGFkYSA9ICRkYXRhLT5mb3JtYXQoJ2QtbS1ZJyk7Cgp2YXJfZHVtcCgkZm9ybWF0YWRhKTs=