You can format the time in several ways by manipulating this DateTime object. The documentation of this method of php brings numerous ways of doing it.
But as the question refers to the Brazilian format here it goes:
$datetime2 = new DateTime('2011-01-01');
var_dump($datetime2->format('d/m/y'));
Output: string(8) "01/01/11"
Another example:
$datetime1 = new DateTime('2011-01-02');
var_dump($datetime1->format('d*m*y'));
Output: string(8) "02*01*11"
Make sure the time entered is in the pattern: ('ano-mes-dia')
. If not strange things will happen .
Now with the data in perfect order apply your methods:
$interval = $datetime1->diff($datetime2);
echo $interval->format('%R%a days');
Output: 1