format("m"); $d = $date->format("d"); $d_array = str_split($d); if($m == $d_array[0] + $d_array[1]){ $count++; } } echo (string)$count . "\n";