1--TEST-- 2Bug #49778 (DateInterval::format("%a") is always zero when an interval is created from an ISO string) 3--FILE-- 4<?php 5$i=new DateInterval('P7D'); 6var_dump($i); 7echo $i->format("%d"), "\n"; 8echo $i->format("%a"), "\n"; 9?> 10--EXPECTF-- 11object(DateInterval)#%d (%d) { 12 ["y"]=> 13 int(0) 14 ["m"]=> 15 int(0) 16 ["d"]=> 17 int(7) 18 ["h"]=> 19 int(0) 20 ["i"]=> 21 int(0) 22 ["s"]=> 23 int(0) 24 ["f"]=> 25 float(0) 26 ["invert"]=> 27 int(0) 28 ["days"]=> 29 bool(false) 30 ["from_string"]=> 31 bool(false) 32} 337 34(unknown) 35