<?php
$data1 = new DateTime("2017-05-12");
$data2 = new DateTime("2017-05-09");
$diff = $data1->diff($data2);
echo $diff->format("Diferença de %y anos, %m meses e %d dias."), PHP_EOL;
PD9waHAKCiRkYXRhMSA9IG5ldyBEYXRlVGltZSgiMjAxNy0wNS0xMiIpOwokZGF0YTIgPSBuZXcgRGF0ZVRpbWUoIjIwMTctMDUtMDkiKTsKCiRkaWZmID0gJGRhdGExLT5kaWZmKCRkYXRhMik7CgplY2hvICRkaWZmLT5mb3JtYXQoIkRpZmVyZW7Dp2EgZGUgJXkgYW5vcywgJW0gbWVzZXMgZSAlZCBkaWFzLiIpLCBQSFBfRU9MOw==