<?php
$dateTime1 = new DateTime("2015-07-14");
$dateTime2 = new DateTime("2015-01-01");
$interval = $dateTime2->diff($dateTime1);
var_dump($interval->format("%R%a days"));
PD9waHAKCiRkYXRlVGltZTEgPSBuZXcgRGF0ZVRpbWUoIjIwMTUtMDctMTQiKTsKJGRhdGVUaW1lMiA9IG5ldyBEYXRlVGltZSgiMjAxNS0wMS0wMSIpOwoKJGludGVydmFsID0gJGRhdGVUaW1lMi0+ZGlmZigkZGF0ZVRpbWUxKTsKCnZhcl9kdW1wKCRpbnRlcnZhbC0+Zm9ybWF0KCIlUiVhIGRheXMiKSk7Cg==