<?php
$interval = date_diff($datetime1, $datetime2);
echo $interval->format('Интервал между 01.01.2010-01.01.2012: %y лет');
PD9waHAKCiRkYXRldGltZTEgPSBkYXRlX2NyZWF0ZSgnMDEvMDEvMjAxMCcpOwokZGF0ZXRpbWUyID0gZGF0ZV9jcmVhdGUoIjAxLzAxLzIwMTIiKTsKCiRpbnRlcnZhbCA9IGRhdGVfZGlmZigkZGF0ZXRpbWUxLCAkZGF0ZXRpbWUyKTsKZWNobyAkaW50ZXJ2YWwtPmZvcm1hdCgn0JjQvdGC0LXRgNCy0LDQuyDQvNC10LbQtNGDIDAxLjAxLjIwMTAtMDEuMDEuMjAxMjogJXkg0LvQtdGCJyk7Cg==