- printf: documentation ( source)
<?php
$date = new DateTime('2013-01-01');
$date2 = clone $date;
for($i = 1; $i <= 10; $i ++) {
$date2->modify("+1 month +3 day");
printf("Date: %s \nExpected : %d\nRecived : %s\n\n", $date2->format("Y-m-d"), $i * 34, $date->diff($date2)->format("%a"));
}